芝麻web文件管理V1.00
编辑当前文件:/home/strato/chroot/opt/RZphp5/includes/test/MIME_Type/tests/TypeTest.php
markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement testHasParameters(). */ public function testHasParameters() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement testGetParameters(). */ public function testGetParameters() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement testStripParameters(). */ public function testStripParameters() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * */ public function testStripComments() { $this->assertEquals('def', MIME_Type::stripComments('(abc)def(ghi)')); $this->assertEquals('def', MIME_Type::stripComments('(abc)def')); $this->assertEquals('def', MIME_Type::stripComments('def(ghi)')); $this->assertEquals('def', MIME_Type::stripComments('(\)abc)def(\))')); $this->assertEquals('def', MIME_Type::stripComments('(a"bc)def")def')); $this->assertEquals('(abc)def', MIME_Type::stripComments('"(abc)def"')); $comment = ''; $this->assertEquals('def', MIME_Type::stripComments('(abc)def(ghi)', $comment)); $this->assertEquals('abc ghi', $comment); } /** * @todo Implement testGetMedia(). */ public function testGetMedia() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement testGetSubType(). */ public function testGetSubType() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement testGet(). */ public function testGet() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement testIsExperimental(). */ public function testIsExperimental() { $this->assertTrue(MIME_Type::isExperimental('text/x-test')); $this->assertTrue(MIME_Type::isExperimental('image/X-test')); $this->assertFalse(MIME_Type::isExperimental('text/plain')); } /** * @todo Implement testIsVendor(). */ public function testIsVendor() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * */ public function testIsWildcard() { $this->assertTrue(MIME_Type::isWildcard('*/*')); $this->assertTrue(MIME_Type::isWildcard('image/*')); $this->assertFalse(MIME_Type::isWildcard('text/plain')); } /** * */ public function testWildcardMatch() { $this->assertTrue(MIME_Type::wildcardMatch('*/*', 'image/png')); $this->assertTrue(MIME_Type::wildcardMatch('image/*', 'image/png')); $this->assertFalse(MIME_Type::wildcardMatch('image/*', 'text/plain')); } /** * @todo Implement testAddParameter(). */ public function testAddParameter() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement testRemoveParameter(). */ public function testRemoveParameter() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement testAutoDetect(). */ public function testAutoDetect() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement test_handleDetection(). */ public function test_handleDetection() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } /** * @todo Implement test_fileAutoDetect(). */ public function test_fileAutoDetect() { // Remove the following line when you implement this test. $this->markTestIncomplete( "This test has not been implemented yet." ); } public function testComments() { $type = new MIME_Type('(UTF-8 Plain Text) text / plain ; charset = utf-8'); $this->assertEquals( 'text/plain; charset="utf-8"', $type->get() ); $type = new MIME_Type('text (Text) / plain ; charset = utf-8'); $this->assertEquals( 'text/plain; charset="utf-8"', $type->get() ); $type = new MIME_Type('text / (Plain) plain ; charset = utf-8'); $this->assertEquals( 'text/plain; charset="utf-8"', $type->get() ); $type = new MIME_Type('text / plain (Plain Text) ; charset = utf-8'); $this->assertEquals( 'text/plain; charset="utf-8"', $type->get() ); $type = new MIME_Type('text / plain ; (Charset=utf-8) charset = utf-8'); $this->assertEquals( 'text/plain; charset="utf-8" (Charset=utf-8)', $type->get() ); $type = new MIME_Type('text / plain ; charset (Charset) = utf-8'); $this->assertEquals( 'text/plain; charset="utf-8" (Charset)', $type->get() ); $type = new MIME_Type('text / plain ; charset = (UTF8) utf-8'); $this->assertEquals( 'text/plain; charset="utf-8" (UTF8)', $type->get() ); $type = new MIME_Type('text / plain ; charset = utf-8 (UTF-8 Plain Text)'); $this->assertEquals( 'text/plain; charset="utf-8" (UTF-8 Plain Text)', $type->get() ); $type = new MIME_Type('application/x-foobar;description="bbgh(kdur"'); $this->assertEquals( 'application/x-foobar; description="bbgh(kdur"', $type->get() ); $type = new MIME_Type('application/x-foobar;description="a \"quoted string\""'); $this->assertEquals( 'application/x-foobar; description="a \"quoted string\""', $type->get() ); } } // Call MIME_TypeTest::main() if this source file is executed directly. if (PHPUnit_MAIN_METHOD == "MIME_TypeTest::main") { MIME_TypeTest::main(); } ?>