Browse Source

Zend_Application_Resource_ModulesTest minor fixes.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@15758 44c647ce-9c0f-0410-b52a-842ac1e357ba
alexander 16 years ago
parent
commit
956ff057d2
1 changed files with 9 additions and 7 deletions
  1. 9 7
      tests/Zend/Application/Resource/ModulesTest.php

+ 9 - 7
tests/Zend/Application/Resource/ModulesTest.php

@@ -54,7 +54,7 @@ class Zend_Application_Resource_ModulesTest extends PHPUnit_Framework_TestCase
         // Store original autoloaders
         $this->loaders = spl_autoload_functions();
         if (!is_array($this->loaders)) {
-            // spl_autoload_functions does not return empty array when no 
+            // spl_autoload_functions does not return empty array when no
             // autoloaders registered...
             $this->loaders = array();
         }
@@ -135,9 +135,10 @@ class Zend_Application_Resource_ModulesTest extends PHPUnit_Framework_TestCase
         $resource->setBootstrap($this->bootstrap);
         $resource->init();
         $bootstraps = $resource->getExecutedBootstraps();
-        $test       = array_keys((array) $bootstraps);
-        $expected   = array('bar', 'foo-bar', 'foo');
-        $this->assertEquals($expected, $test);
+        $this->assertEquals(3, count((array)$bootstraps));
+        $this->assertArrayHasKey('bar',     (array)$bootstraps);
+        $this->assertArrayHasKey('foo-bar', (array)$bootstraps);
+        $this->assertArrayHasKey('foo',     (array)$bootstraps);
     }
 
     public function testShouldReturnExecutedBootstrapsWhenComplete()
@@ -150,9 +151,10 @@ class Zend_Application_Resource_ModulesTest extends PHPUnit_Framework_TestCase
         $resource = new Zend_Application_Resource_Modules(array());
         $resource->setBootstrap($this->bootstrap);
         $bootstraps = $resource->init();
-        $test       = array_keys((array) $bootstraps);
-        $expected   = array('bar', 'foo-bar', 'foo');
-        $this->assertEquals($expected, $test);
+        $this->assertEquals(3, count((array)$bootstraps));
+        $this->assertArrayHasKey('bar',     (array)$bootstraps);
+        $this->assertArrayHasKey('foo-bar', (array)$bootstraps);
+        $this->assertArrayHasKey('foo',     (array)$bootstraps);
     }
 }