diff options
author | zotlabs <mike@macgirvin.com> | 2016-10-18 16:29:36 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-10-18 16:29:36 -0700 |
commit | d55fcd055d878d29864bdf609f6e3f26e24837d0 (patch) | |
tree | d29747f3b2fba12d686084c91136a4dc7b9f52a9 /tests/unit/UploadTest.php | |
parent | 9e3032e919e4778aff99c2fac7b1bb102aa6c934 (diff) | |
parent | c2e299440380f04c55dc4cd77ea8e0ac6d09af53 (diff) | |
download | volse-hubzilla-d55fcd055d878d29864bdf609f6e3f26e24837d0.tar.gz volse-hubzilla-d55fcd055d878d29864bdf609f6e3f26e24837d0.tar.bz2 volse-hubzilla-d55fcd055d878d29864bdf609f6e3f26e24837d0.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'tests/unit/UploadTest.php')
-rw-r--r-- | tests/unit/UploadTest.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/unit/UploadTest.php b/tests/unit/UploadTest.php new file mode 100644 index 000000000..ab9d0e50a --- /dev/null +++ b/tests/unit/UploadTest.php @@ -0,0 +1,31 @@ +<?php +/** + * this file contains tests for the uploader + * + * @package test.util + */ + +use PHPUnit\Framework\TestCase; + +/** required, it is the file under test */ +require_once('include/attach.php'); + +/** + * TestCase for the uploader + * + * @author ken restivo + * @package test.util + */ +class UploadTest extends TestCase { + public function testFileNameMutipleDots() { + $multidots = "foo.bar.baz.0.1.3.ogg"; + $this->assertEquals("audio/ogg", z_mime_content_type($multidots)); + $this->assertNotEquals("application/octet-stream", z_mime_content_type($multidots)); + } + + public function testFileNameOneDot() { + $multidots = "foo.ogg"; + $this->assertEquals("audio/ogg", z_mime_content_type($multidots)); + $this->assertNotEquals("application/octet-stream", z_mime_content_type($multidots)); + } +}
\ No newline at end of file |