Просмотр исходного кода

Ensure that mime_content_type exists before calling it

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24729 44c647ce-9c0f-0410-b52a-842ac1e357ba
rob 13 лет назад
Родитель
Сommit
f5f0cfa46b
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      tests/Zend/Validate/File/IsCompressedTest.php

+ 5 - 0
tests/Zend/Validate/File/IsCompressedTest.php

@@ -69,6 +69,11 @@ class Zend_Validate_File_IsCompressedTest extends PHPUnit_Framework_TestCase
                 );
         }
 
+        // Prevent error in the next check
+        if (!function_exists('mime_content_type')) {
+            $this->markTestSkipped('mime_content_type function is not available.');
+        }
+
         // Sometimes mime_content_type() gives application/zip and sometimes 
         // application/x-zip ...
         $expectedMimeType = mime_content_type(dirname(__FILE__) . '/_files/test.zip');