Explorar el Código

[GENERIC] Zend_Validate:

- fixed unittests

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22520 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas hace 15 años
padre
commit
f3357cf51b

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

@@ -73,7 +73,7 @@ class Zend_Validate_File_IsCompressedTest extends PHPUnit_Framework_TestCase
                 . ' but mime_content_type exhibits buggy behavior on this system.'
                 );
         }
-        
+
         $valuesExpected = array(
             array(null, true),
             array('zip', true),
@@ -188,6 +188,10 @@ class Zend_Validate_File_IsCompressedTest extends PHPUnit_Framework_TestCase
 
     public function testOptionsAtConstructor()
     {
+        if (!extension_loaded('fileinfo')) {
+            $this->markTestSkipped('This PHP Version has no finfo installed');
+        }
+
         $validator = new Zend_Validate_File_IsCompressed(array(
             'image/gif',
             'image/jpg',

+ 4 - 0
tests/Zend/Validate/File/IsImageTest.php

@@ -179,6 +179,10 @@ class Zend_Validate_File_IsImageTest extends PHPUnit_Framework_TestCase
 
     public function testOptionsAtConstructor()
     {
+        if (!extension_loaded('fileinfo')) {
+            $this->markTestSkipped('This PHP Version has no finfo installed');
+        }
+
         $validator = new Zend_Validate_File_IsImage(array(
             'image/gif',
             'image/jpg',