From 8083a8658134654e9ad40f58ecd7ff9d0fb12161 Mon Sep 17 00:00:00 2001 From: ken restivo Date: Tue, 27 Oct 2015 19:53:27 -0700 Subject: Add rudimentary unit test for z_mime_content_type. --- tests/upload_test.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/upload_test.php (limited to 'tests') diff --git a/tests/upload_test.php b/tests/upload_test.php new file mode 100644 index 000000000..031315fba --- /dev/null +++ b/tests/upload_test.php @@ -0,0 +1,29 @@ +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 -- cgit v1.2.3