Explorar o código

TESTS
- Fix for failing RsaTest
- Fix for LocaleTest in Zend_Application to work with PHPUnit 3.4
- Altered phpunit.xml to not auto-whitelist the library/ directory causing long runs in win32 environment


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23770 44c647ce-9c0f-0410-b52a-842ac1e357ba

ralph %!s(int64=15) %!d(string=hai) anos
pai
achega
6e3ac39ef8

+ 2 - 2
tests/Zend/Application/Resource/LocaleTest.php

@@ -125,7 +125,7 @@ class Zend_Application_Resource_LocaleTest extends PHPUnit_Framework_TestCase
         $locale   = $resource->getLocale();
 
         // This test will fail if your configured locale is kok_IN
-        $this->assertFalse('kok_IN' == $locale->__toString());
+        $this->assertEquals('kok_IN', $locale->__toString());
         $this->assertSame(Zend_Registry::get('Zend_Locale'), $locale);
     }
 
@@ -146,7 +146,7 @@ class Zend_Application_Resource_LocaleTest extends PHPUnit_Framework_TestCase
         $resource = new Zend_Application_Resource_Locale($config);
         $resource->init();
         $backend = Zend_Locale::getCache()->getBackend();
-        $this->assertInstanceOf('Zend_Cache_Backend_BlackHole', $backend);
+        $this->assertType('Zend_Cache_Backend_BlackHole', $backend);
         Zend_Locale::removeCache();
     }
 

+ 3 - 0
tests/Zend/Crypt/Rsa/RsaTest.php

@@ -135,6 +135,9 @@ CERT;
 
     public function testConstructorSetsHashOption()
     {
+        if (!defined('OPENSSL_ALGO_MD2')) {
+            $this->markTestSkipped('The OPENSSL_ALGO_MD2 constant is not defined in this PHP instance.');
+        }
         $rsa = new Zend_Crypt_Rsa(array('hashAlgorithm'=>'md2'));
         $this->assertEquals(OPENSSL_ALGO_MD2, $rsa->getHashAlgorithm());
     }

+ 2 - 0
tests/phpunit.xml

@@ -3,9 +3,11 @@
         <directory>./</directory>
     </testsuite>
 
+    <!-- Enable this for proper unit testing code coverage reports
     <filter>
         <whitelist>
             <directory suffix=".php">../library/Zend</directory>
         </whitelist>
     </filter>
+    -->
 </phpunit>