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

Merge r25216 to 1.12 release branch

git-svn-id: http://framework.zend.com/svn/framework/standard/branches/release-1.12@25217 44c647ce-9c0f-0410-b52a-842ac1e357ba
frosch 13 лет назад
Родитель
Сommit
025ac7e89f

+ 7 - 5
tests/Zend/Controller/Action/Helper/ActionStackTest.php

@@ -169,13 +169,15 @@ class Zend_Controller_Action_Helper_ActionStackTest extends PHPUnit_Framework_Te
         $helper = new Zend_Controller_Action_Helper_ActionStack();
         /** FC should be reseted to test ActionStack with a really blank FC */
         $this->front->resetInstance();
-        try{
+        try {
             $helper->direct('baz', 'bar', 'foo');
             $this->fail('Zend_Controller_Action_Exception should be thrown');
-        }catch(Zend_Exception $e){
-            $this->assertType('Zend_Controller_Action_Exception',
-                   $e,
-                   'Zend_Controller_Action_Exception expected, '.get_class($e).' caught');
+        } catch (Zend_Exception $e) {
+            $this->assertTrue(
+                $e instanceof Zend_Controller_Action_Exception,
+                'Zend_Controller_Action_Exception expected, ' . get_class($e)
+                    . ' caught'
+            );
         }
     }
 

+ 5 - 3
tests/Zend/Controller/FrontTest.php

@@ -610,9 +610,11 @@ class Zend_Controller_FrontTest extends PHPUnit_Framework_TestCase
         try {
             $this->_controller->addModuleDirectory($moduleDir);
             $this->fail('Exception expected but not thrown');
-        }catch(Exception $e){
-            $this->assertType('Zend_Exception',$e);
-            $this->assertRegExp('/Directory \w+ not readable/',$e->getMessage());
+        } catch (Exception $e) {
+            $this->assertTrue($e instanceof Zend_Exception);
+            $this->assertRegExp(
+                '/Directory \w+ not readable/', $e->getMessage()
+            );
         }
     }
 

+ 22 - 22
tests/Zend/Controller/Router/RewriteTest.php

@@ -94,13 +94,13 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
         $routes = $this->_router->getRoutes();
 
         $this->assertEquals(1, count($routes));
-        $this->assertType('Zend_Controller_Router_Route', $routes['archive']);
+        $this->assertTrue($routes['archive'] instanceof Zend_Controller_Router_Route);
 
         $this->_router->addRoute('register', new Zend_Controller_Router_Route('register/:action', array('controller' => 'profile', 'action' => 'register')));
         $routes = $this->_router->getRoutes();
 
         $this->assertEquals(2, count($routes));
-        $this->assertType('Zend_Controller_Router_Route', $routes['register']);
+        $this->assertTrue($routes['register'] instanceof Zend_Controller_Router_Route);
     }
 
     public function testAddRoutes()
@@ -114,8 +114,8 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
         $values = $this->_router->getRoutes();
 
         $this->assertEquals(2, count($values));
-        $this->assertType('Zend_Controller_Router_Route', $values['archive']);
-        $this->assertType('Zend_Controller_Router_Route', $values['register']);
+        $this->assertTrue($values['archive'] instanceof Zend_Controller_Router_Route);
+        $this->assertTrue($values['register'] instanceof Zend_Controller_Router_Route);
     }
 
     public function testHasRoute()
@@ -133,7 +133,7 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
 
         $route = $this->_router->getRoute('archive');
 
-        $this->assertType('Zend_Controller_Router_Route', $route);
+        $this->assertTrue($route instanceof Zend_Controller_Router_Route);
         $this->assertSame($route, $archive);
     }
 
@@ -151,7 +151,7 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
         try {
             $route = $this->_router->removeRoute('archive');
         } catch (Zend_Controller_Router_Exception $e) {
-            $this->assertType('Zend_Controller_Router_Exception', $e);
+            $this->assertTrue($e instanceof Zend_Controller_Router_Exception);
             return true;
         }
 
@@ -163,7 +163,7 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
         try {
             $route = $this->_router->getRoute('bogus');
         } catch (Zend_Controller_Router_Exception $e) {
-            $this->assertType('Zend_Controller_Router_Exception', $e);
+            $this->assertTrue($e instanceof Zend_Controller_Router_Exception);
             return true;
         }
 
@@ -176,7 +176,7 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
 
         $token = $this->_router->route($request);
 
-        $this->assertType('Zend_Controller_Request_Http', $token);
+        $this->assertTrue($token instanceof Zend_Controller_Request_Http);
     }
 
     public function testRouteWithIncorrectRequest()
@@ -187,7 +187,7 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
             $token = $this->_router->route($request);
             $this->fail('Should throw an Exception');
         } catch (Exception $e) {
-            $this->assertType('Zend_Controller_Router_Exception', $e);
+            $this->assertTrue($e instanceof Zend_Controller_Router_Exception);
         }
     }
 
@@ -198,7 +198,7 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
         $token = $this->_router->route($request);
 
         $routes = $this->_router->getRoutes();
-        $this->assertType('Zend_Controller_Router_Route_Module', $routes['default']);
+        $this->assertTrue($routes['default'] instanceof Zend_Controller_Router_Route_Module);
     }
 
     public function testDefaultRouteWithEmptyAction()
@@ -308,14 +308,14 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
             $route = $this->_router->getCurrentRoute();
             $this->fail();
         } catch (Exception $e) {
-            $this->assertType('Zend_Controller_Router_Exception', $e);
+            $this->assertTrue($e instanceof Zend_Controller_Router_Exception);
         }
 
         try {
             $route = $this->_router->getCurrentRouteName();
             $this->fail();
         } catch (Exception $e) {
-            $this->assertType('Zend_Controller_Router_Exception', $e);
+            $this->assertTrue($e instanceof Zend_Controller_Router_Exception);
         }
 
         $token = $this->_router->route($request);
@@ -328,7 +328,7 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
         }
 
         $this->assertEquals('default', $name);
-        $this->assertType('Zend_Controller_Router_Route_Module', $route);
+        $this->assertTrue($route instanceof Zend_Controller_Router_Route_Module);
     }
 
     public function testAddConfig()
@@ -339,13 +339,13 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
 
         $this->_router->addConfig($config, 'routes');
 
-        $this->assertType('Zend_Controller_Router_Route_Static', $this->_router->getRoute('news'));
-        $this->assertType('Zend_Controller_Router_Route', $this->_router->getRoute('archive'));
+        $this->assertTrue($this->_router->getRoute('news') instanceof Zend_Controller_Router_Route_Static);
+        $this->assertTrue($this->_router->getRoute('archive') instanceof Zend_Controller_Router_Route);
 
         try {
             $this->_router->addConfig($config, 'database');
         } catch (Exception $e) {
-            $this->assertType('Zend_Controller_Router_Exception', $e);
+            $this->assertTrue($e instanceof Zend_Controller_Router_Exception);
             return true;
         }
     }
@@ -358,8 +358,8 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
 
         $this->_router->addConfig($config->routes);
 
-        $this->assertType('Zend_Controller_Router_Route_Static', $this->_router->getRoute('news'));
-        $this->assertType('Zend_Controller_Router_Route', $this->_router->getRoute('archive'));
+        $this->assertTrue($this->_router->getRoute('news') instanceof Zend_Controller_Router_Route_Static);
+        $this->assertTrue($this->_router->getRoute('archive') instanceof Zend_Controller_Router_Route);
     }
 
     public function testAddConfigWithRootNode()
@@ -370,8 +370,8 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
 
         $this->_router->addConfig($config);
 
-        $this->assertType('Zend_Controller_Router_Route_Static', $this->_router->getRoute('news'));
-        $this->assertType('Zend_Controller_Router_Route', $this->_router->getRoute('archive'));
+        $this->assertTrue($this->_router->getRoute('news') instanceof Zend_Controller_Router_Route_Static);
+        $this->assertTrue($this->_router->getRoute('archive') instanceof Zend_Controller_Router_Route);
     }
 
     public function testRemoveDefaultRoutes()
@@ -487,8 +487,8 @@ class Zend_Controller_Router_RewriteTest extends PHPUnit_Framework_TestCase
         $this->_router->addRoute('req', new Zend_Controller_Router_Route_Interface_Mockup());
         $routeRequest = $this->_router->getRoute('req')->getRequest();
 
-        $this->assertType('Zend_Controller_Request_Abstract', $request);
-        $this->assertType('Zend_Controller_Request_Abstract', $routeRequest);
+        $this->assertTrue($request instanceof Zend_Controller_Request_Abstract);
+        $this->assertTrue($routeRequest instanceof Zend_Controller_Request_Abstract);
         $this->assertSame($request, $routeRequest);
     }
 

+ 14 - 14
tests/Zend/Controller/Router/Route/ChainTest.php

@@ -93,7 +93,7 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
 
         $chain = $foo->chain($bar);
 
-        $this->assertType('Zend_Controller_Router_Route_Chain', $chain);
+        $this->assertTrue($chain instanceof Zend_Controller_Router_Route_Chain);
     }
 
     public function testChainingMatch()
@@ -272,7 +272,7 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
 
         $res = $chain->match(new Zend_Controller_Router_ChainTest_Request('http://localhost/foo.bar'));
 
-        $this->assertType('array', $res);
+        $this->assertTrue(is_array($res));
 
         $res = $chain->match(new Zend_Controller_Router_ChainTest_Request('http://localhost/foo/bar'));
         $this->assertEquals(false, $res);
@@ -280,7 +280,7 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
         $chain->chain($baz, ':');
 
         $res = $chain->match(new Zend_Controller_Router_ChainTest_Request('http://localhost/foo.bar:baz'));
-        $this->assertType('array', $res);
+        $this->assertTrue(is_array($res));
     }
 
     public function testI18nChaining()
@@ -308,7 +308,7 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
         $request = new Zend_Controller_Router_ChainTest_Request('http://foobar.zend.com/bar');
         $res = $chain->match($request);
 
-        $this->assertType('array', $res);
+        $this->assertTrue(is_array($res));
         $this->assertRegexp('#[^a-z0-9]?foobar\.zend\.com/bar/foo/bar#i', $chain->assemble(array('account' => 'foobar', 'foo' => 'bar')));
     }
 
@@ -324,7 +324,7 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
         $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/bar');
         $res = $chain->match($request);
 
-        $this->assertType('array', $res);
+        $this->assertTrue(is_array($res));
         $this->assertRegexp('#[^a-z0-9]?www\.zend\.com/bar$#i', $chain->assemble());
     }
 
@@ -340,7 +340,7 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
         $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/bar');
         $res = $chain->match($request);
 
-        $this->assertType('array', $res);
+        $this->assertTrue(is_array($res));
         $this->assertRegexp('#[^a-z0-9]?www\.zend\.com/bar$#i', $chain->assemble());
     }
 
@@ -356,13 +356,13 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
         $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/user/1');
         $res = $profileChain->match($request);
 
-        $this->assertType('array', $res);
+        $this->assertTrue(is_array($res));
         $this->assertEquals('prof', $res['controller']);
 
         $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/article/1');
         $res = $articleChain->match($request);
 
-        $this->assertType('array', $res);
+        $this->assertTrue(is_array($res));
         $this->assertEquals('art', $res['controller']);
         $this->assertEquals('art', $res['action']);
     }
@@ -630,10 +630,10 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
         $this->assertEquals('index', $token->getControllerName());
         $this->assertEquals('index',   $token->getActionName());
 
-        $this->assertType('Zend_Controller_Router_Route_Chain', $router->getRoute('user-profile'));
-        $this->assertType('Zend_Controller_Router_Route_Chain', $router->getRoute('www-imprint'));
-        $this->assertType('Zend_Controller_Router_Route_Chain', $router->getRoute('www-index'));
-        $this->assertType('Zend_Controller_Router_Route_Chain', $router->getRoute('www-index'));
+        $this->assertTrue($router->getRoute('user-profile') instanceof Zend_Controller_Router_Route_Chain);
+        $this->assertTrue($router->getRoute('www-imprint') instanceof Zend_Controller_Router_Route_Chain);
+        $this->assertTrue($router->getRoute('www-index') instanceof Zend_Controller_Router_Route_Chain);
+        $this->assertTrue($router->getRoute('www-index') instanceof Zend_Controller_Router_Route_Chain);
     }
 
     public function testChainingWorksWithWildcardAndNoParameters()
@@ -795,7 +795,7 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
         $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/foo');
         $res = $chain->match($request);
 
-        $this->assertType('array', $res, 'Route did not match');
+        $this->assertTrue(is_array($res), 'Route did not match');
         $this->assertEquals(0, $res['bar']);
     }
 
@@ -811,7 +811,7 @@ class Zend_Controller_Router_Route_ChainTest extends PHPUnit_Framework_TestCase
         $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/foo/2');
         $res = $chain->match($request);
 
-        $this->assertType('array', $res, 'Route did not match');
+        $this->assertTrue(is_array($res), 'Route did not match');
         $this->assertEquals(2, $res['bar']);
     }
 

+ 11 - 11
tests/Zend/Controller/Router/Route/ModuleTest.php

@@ -91,7 +91,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
     {
         $values = $this->route->match('mod');
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertTrue(isset($values['module']));
         $this->assertEquals('mod', $values['module']);
     }
@@ -99,7 +99,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
     public function testModuleAndControllerMatch()
     {
         $values = $this->route->match('mod/con');
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertTrue(isset($values['module']));
         $this->assertEquals('mod', $values['module']);
         $this->assertTrue(isset($values['controller']));
@@ -109,7 +109,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
     public function testModuleControllerAndActionMatch()
     {
         $values = $this->route->match('mod/con/act');
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertTrue(isset($values['module']));
         $this->assertEquals('mod', $values['module']);
         $this->assertTrue(isset($values['controller']));
@@ -121,7 +121,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
     public function testModuleControllerActionAndParamsMatch()
     {
         $values = $this->route->match('mod/con/act/var/val/foo');
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertTrue(isset($values['module']));
         $this->assertEquals('mod', $values['module']);
         $this->assertTrue(isset($values['controller']));
@@ -137,7 +137,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
     public function testControllerOnlyMatch()
     {
         $values = $this->route->match('con');
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertTrue(isset($values['controller']));
         $this->assertEquals('con', $values['controller']);
     }
@@ -145,7 +145,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
     public function testControllerOnlyAndActionMatch()
     {
         $values = $this->route->match('con/act');
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertTrue(isset($values['controller']));
         $this->assertEquals('con', $values['controller']);
         $this->assertTrue(isset($values['action']));
@@ -155,7 +155,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
     public function testControllerOnlyActionAndParamsMatch()
     {
         $values = $this->route->match('con/act/var/val/foo');
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertTrue(isset($values['controller']));
         $this->assertEquals('con', $values['controller']);
         $this->assertTrue(isset($values['action']));
@@ -176,7 +176,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
 
         $values = $this->route->match('mod/ctrl');
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertSame('mod', $values['m']);
         $this->assertSame('ctrl', $values['c']);
         $this->assertSame('index', $values['a']);
@@ -190,7 +190,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
 
         $values = $this->route->match('mod/ctrl');
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertSame('mod', $values['m'], var_export(array_keys($values), 1));
         $this->assertSame('ctrl', $values['c'], var_export(array_keys($values), 1));
         $this->assertSame('index', $values['a'], var_export(array_keys($values), 1));
@@ -422,7 +422,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
         $config = new Zend_Config($routeConf);
         $route = Zend_Controller_Router_Route_Module::getInstance($config);
 
-        $this->assertType('Zend_Controller_Router_Route_Module', $route);
+        $this->assertTrue($route instanceof Zend_Controller_Router_Route_Module);
     }
 
     public function testEncode()
@@ -463,7 +463,7 @@ class Zend_Controller_Router_Route_ModuleTest extends PHPUnit_Framework_TestCase
 
         $values = $this->route->match('mod/ctrl');
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertSame('mod', $values['m'], var_export(array_keys($values), 1));
         $this->assertSame('ctrl', $values['c'], var_export(array_keys($values), 1));
         $this->assertSame('index', $values['a'], var_export(array_keys($values), 1));

+ 1 - 1
tests/Zend/Controller/Router/Route/RegexTest.php

@@ -399,7 +399,7 @@ class Zend_Controller_Router_Route_RegexTest extends PHPUnit_Framework_TestCase
         $config = new Zend_Config($routeConf);
         $route = Zend_Controller_Router_Route_Regex::getInstance($config);
 
-        $this->assertType('Zend_Controller_Router_Route_Regex', $route);
+        $this->assertTrue($route instanceof Zend_Controller_Router_Route_Regex);
 
         $values = $route->match('forum/1');
 

+ 5 - 5
tests/Zend/Controller/Router/Route/StaticTest.php

@@ -40,7 +40,7 @@ class Zend_Controller_Router_Route_StaticTest extends PHPUnit_Framework_TestCase
         $route = new Zend_Controller_Router_Route_Static('users/all');
         $values = $route->match('users/all');
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
     }
 
     public function testStaticMatchFailure()
@@ -57,7 +57,7 @@ class Zend_Controller_Router_Route_StaticTest extends PHPUnit_Framework_TestCase
                     array('controller' => 'ctrl', 'action' => 'act'));
         $values = $route->match('users/all');
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertSame('ctrl', $values['controller']);
         $this->assertSame('act', $values['action']);
     }
@@ -67,7 +67,7 @@ class Zend_Controller_Router_Route_StaticTest extends PHPUnit_Framework_TestCase
         $route = new Zend_Controller_Router_Route_Static('żółć');
         $values = $route->match('żółć');
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
     }
 
     public function testRootRoute()
@@ -93,7 +93,7 @@ class Zend_Controller_Router_Route_StaticTest extends PHPUnit_Framework_TestCase
 
         $values = $route->getDefaults();
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertSame('ctrl', $values['controller']);
         $this->assertSame('act', $values['action']);
     }
@@ -121,7 +121,7 @@ class Zend_Controller_Router_Route_StaticTest extends PHPUnit_Framework_TestCase
         $config = new Zend_Config($routeConf);
         $route = Zend_Controller_Router_Route_Static::getInstance($config);
 
-        $this->assertType('Zend_Controller_Router_Route_Static', $route);
+        $this->assertTrue($route instanceof Zend_Controller_Router_Route_Static);
 
         $values = $route->match('users/all');
 

+ 6 - 6
tests/Zend/Controller/Router/RouteTest.php

@@ -427,7 +427,7 @@ class Zend_Controller_Router_RouteTest extends PHPUnit_Framework_TestCase
     {
         $route = new Zend_Controller_Router_Route('archives/:year/:month');
         $values = $route->match('archives/2006/07');
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
 
         $url = $route->assemble(array('month' => '03'));
         $this->assertEquals('archives/2006/03', $url);
@@ -455,7 +455,7 @@ class Zend_Controller_Router_RouteTest extends PHPUnit_Framework_TestCase
     {
         $route = new Zend_Controller_Router_Route('archives/:year/:month/*', array('controller' => 'archive'));
         $values = $route->match('archives/2006/07/controller/test/year/10000/sort/author');
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
 
         $this->assertEquals('archive', $values['controller']);
         $this->assertEquals('2006', $values['year']);
@@ -470,7 +470,7 @@ class Zend_Controller_Router_RouteTest extends PHPUnit_Framework_TestCase
 
         $values = $route->getDefaults();
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertEquals('ctrl', $values['controller']);
         $this->assertEquals('act', $values['action']);
     }
@@ -498,7 +498,7 @@ class Zend_Controller_Router_RouteTest extends PHPUnit_Framework_TestCase
         $config = new Zend_Config($routeConf);
         $route = Zend_Controller_Router_Route::getInstance($config);
 
-        $this->assertType('Zend_Controller_Router_Route', $route);
+        $this->assertTrue($route instanceof Zend_Controller_Router_Route);
 
         $values = $route->match('users/all');
 
@@ -600,7 +600,7 @@ class Zend_Controller_Router_RouteTest extends PHPUnit_Framework_TestCase
         $this->assertEquals('families', $route->assemble());
 
         $values = $route->match('families/edit/id/4');
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
 
         $this->assertEquals('families/edit/id/4', $route->assemble());
     }
@@ -640,7 +640,7 @@ class Zend_Controller_Router_RouteTest extends PHPUnit_Framework_TestCase
 
         $values = $route->match('en/tmp/ctrl/action/id/1', true);
 
-        $this->assertType('array', $values);
+        $this->assertTrue(is_array($values));
         $this->assertEquals('en', $values['lang']);
         $this->assertEquals('tmp', $values['temp']);
         $this->assertEquals('en/tmp', $route->getMatchedPath());