From e20ea8ad7234d8fcbc486ba95865be0dd69d60c1 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 24 Dec 2010 12:54:04 -0500 Subject: [PATCH] Renaming Dispatcher::__loadRoutes -> Dispatcher::_loadRoutes to match naming conventions. Updating method name usage, as assertType is deprecated as of PHPUnit 3.5.6 --- cake/libs/dispatcher.php | 5 ++--- .../cases/console/libs/help_formatter.test.php | 2 +- .../console/libs/task_collection.test.php | 12 ++++++------ cake/tests/cases/console/shells/shell.test.php | 6 +++--- .../cases/libs/controller/component.test.php | 14 +++++++------- .../controller/component_collection.test.php | 12 ++++++------ .../cases/libs/controller/controller.test.php | 6 +++--- .../cases/libs/controller_test_case.test.php | 7 +++---- cake/tests/cases/libs/debugger.test.php | 6 +++--- .../libs/error/exception_renderer.test.php | 4 ++-- .../libs/model/model_integration.test.php | 18 +++++++++--------- .../cases/libs/object_collection.test.php | 4 ++-- .../libs/session/database_session.test.php | 2 +- cake/tests/cases/libs/test_manager.test.php | 2 +- cake/tests/cases/libs/view/helper.test.php | 4 ++-- .../cases/libs/view/helper_collection.test.php | 12 ++++++------ cake/tests/cases/libs/view/view.test.php | 6 +++--- cake/tests/fixtures/fixturized_test_case.php | 2 +- cake/tests/lib/cake_test_case.php | 2 +- cake/tests/lib/controller_test_case.php | 5 ++--- 20 files changed, 64 insertions(+), 67 deletions(-) diff --git a/cake/libs/dispatcher.php b/cake/libs/dispatcher.php index 5352f9d4a..f9b7b059d 100644 --- a/cake/libs/dispatcher.php +++ b/cake/libs/dispatcher.php @@ -198,7 +198,7 @@ class Dispatcher { if (count(Router::$routes) == 0) { $namedExpressions = Router::getNamedExpressions(); extract($namedExpressions); - $this->__loadRoutes(); + $this->_loadRoutes(); } $params = Router::parse($request->url); @@ -254,9 +254,8 @@ class Dispatcher { * Loads route configuration * * @return void - * @access protected */ - protected function __loadRoutes() { + protected function _loadRoutes() { include CONFIGS . 'routes.php'; } diff --git a/cake/tests/cases/console/libs/help_formatter.test.php b/cake/tests/cases/console/libs/help_formatter.test.php index a957843b1..5caae1490 100644 --- a/cake/tests/cases/console/libs/help_formatter.test.php +++ b/cake/tests/cases/console/libs/help_formatter.test.php @@ -435,6 +435,6 @@ TEXT; $formatter = new HelpFormatter($parser); $result = $formatter->xml(false); - $this->assertType('SimpleXmlElement', $result); + $this->assertInstanceOf('SimpleXmlElement', $result); } } diff --git a/cake/tests/cases/console/libs/task_collection.test.php b/cake/tests/cases/console/libs/task_collection.test.php index b89de158c..3bbbd12c8 100644 --- a/cake/tests/cases/console/libs/task_collection.test.php +++ b/cake/tests/cases/console/libs/task_collection.test.php @@ -49,8 +49,8 @@ class TaskCollectionTest extends CakeTestCase { */ function testLoad() { $result = $this->Tasks->load('DbConfig'); - $this->assertType('DbConfigTask', $result); - $this->assertType('DbConfigTask', $this->Tasks->DbConfig); + $this->assertInstanceOf('DbConfigTask', $result); + $this->assertInstanceOf('DbConfigTask', $this->Tasks->DbConfig); $result = $this->Tasks->attached(); $this->assertEquals(array('DbConfig'), $result, 'attached() results are wrong.'); @@ -65,8 +65,8 @@ class TaskCollectionTest extends CakeTestCase { */ function testLoadWithEnableFalse() { $result = $this->Tasks->load('DbConfig', array(), false); - $this->assertType('DbConfigTask', $result); - $this->assertType('DbConfigTask', $this->Tasks->DbConfig); + $this->assertInstanceOf('DbConfigTask', $result); + $this->assertInstanceOf('DbConfigTask', $this->Tasks->DbConfig); $this->assertFalse($this->Tasks->enabled('DbConfig'), 'DbConfigTask should be disabled'); } @@ -94,8 +94,8 @@ class TaskCollectionTest extends CakeTestCase { $this->Tasks = new TaskCollection($shell, $dispatcher); $result = $this->Tasks->load('TestPlugin.OtherTask'); - $this->assertType('OtherTaskTask', $result, 'Task class is wrong.'); - $this->assertType('OtherTaskTask', $this->Tasks->OtherTask, 'Class is wrong'); + $this->assertInstanceOf('OtherTaskTask', $result, 'Task class is wrong.'); + $this->assertInstanceOf('OtherTaskTask', $this->Tasks->OtherTask, 'Class is wrong'); } /** diff --git a/cake/tests/cases/console/shells/shell.test.php b/cake/tests/cases/console/shells/shell.test.php index 91c623cda..900ebaad8 100644 --- a/cake/tests/cases/console/shells/shell.test.php +++ b/cake/tests/cases/console/shells/shell.test.php @@ -143,9 +143,9 @@ class ShellTest extends CakeTestCase { */ public function testConstruct() { $this->assertEqual($this->Shell->name, 'ShellTestShell'); - $this->assertType('ConsoleInput', $this->Shell->stdin); - $this->assertType('ConsoleOutput', $this->Shell->stdout); - $this->assertType('ConsoleOutput', $this->Shell->stderr); + $this->assertInstanceOf('ConsoleInput', $this->Shell->stdin); + $this->assertInstanceOf('ConsoleOutput', $this->Shell->stdout); + $this->assertInstanceOf('ConsoleOutput', $this->Shell->stderr); } /** diff --git a/cake/tests/cases/libs/controller/component.test.php b/cake/tests/cases/libs/controller/component.test.php index 3c8dc99c6..e42c1e0b6 100644 --- a/cake/tests/cases/libs/controller/component.test.php +++ b/cake/tests/cases/libs/controller/component.test.php @@ -284,7 +284,7 @@ class ComponentTest extends CakeTestCase { $Collection = new ComponentCollection(); $Component = new AppleComponent($Collection); - $this->assertType('OrangeComponent', $Component->Orange, 'class is wrong'); + $this->assertInstanceOf('OrangeComponent', $Component->Orange, 'class is wrong'); } /** @@ -296,8 +296,8 @@ class ComponentTest extends CakeTestCase { $Collection = new ComponentCollection(); $Apple = new AppleComponent($Collection); - $this->assertType('OrangeComponent', $Apple->Orange, 'class is wrong'); - $this->assertType('BananaComponent', $Apple->Orange->Banana, 'class is wrong'); + $this->assertInstanceOf('OrangeComponent', $Apple->Orange, 'class is wrong'); + $this->assertInstanceOf('BananaComponent', $Apple->Orange->Banana, 'class is wrong'); $this->assertTrue(empty($Apple->Session)); $this->assertTrue(empty($Apple->Orange->Session)); } @@ -311,7 +311,7 @@ class ComponentTest extends CakeTestCase { $Collection = new ComponentCollection(); $Apple = $Collection->load('Apple'); - $this->assertType('OrangeComponent', $Apple->Orange, 'class is wrong'); + $this->assertInstanceOf('OrangeComponent', $Apple->Orange, 'class is wrong'); $result = $Collection->enabled(); $this->assertEquals(array('Apple'), $result, 'Too many components enabled.'); } @@ -346,9 +346,9 @@ class ComponentTest extends CakeTestCase { $Controller->beforeFilter(); $Controller->Components->trigger('startup', array(&$Controller)); - $this->assertType('SomethingWithEmailComponent', $Controller->SomethingWithEmail); - $this->assertType('EmailComponent', $Controller->SomethingWithEmail->Email); - $this->assertType('ComponentTestController', $Controller->SomethingWithEmail->Email->Controller); + $this->assertInstanceOf('SomethingWithEmailComponent', $Controller->SomethingWithEmail); + $this->assertInstanceOf('EmailComponent', $Controller->SomethingWithEmail->Email); + $this->assertInstanceOf('ComponentTestController', $Controller->SomethingWithEmail->Email->Controller); } } diff --git a/cake/tests/cases/libs/controller/component_collection.test.php b/cake/tests/cases/libs/controller/component_collection.test.php index ecdac7775..3e0e7bc53 100644 --- a/cake/tests/cases/libs/controller/component_collection.test.php +++ b/cake/tests/cases/libs/controller/component_collection.test.php @@ -47,8 +47,8 @@ class ComponentCollectionTest extends CakeTestCase { */ function testLoad() { $result = $this->Components->load('Cookie'); - $this->assertType('CookieComponent', $result); - $this->assertType('CookieComponent', $this->Components->Cookie); + $this->assertInstanceOf('CookieComponent', $result); + $this->assertInstanceOf('CookieComponent', $this->Components->Cookie); $result = $this->Components->attached(); $this->assertEquals(array('Cookie'), $result, 'attached() results are wrong.'); @@ -66,8 +66,8 @@ class ComponentCollectionTest extends CakeTestCase { */ function testLoadWithEnableFalse() { $result = $this->Components->load('Cookie', array('enabled' => false)); - $this->assertType('CookieComponent', $result); - $this->assertType('CookieComponent', $this->Components->Cookie); + $this->assertInstanceOf('CookieComponent', $result); + $this->assertInstanceOf('CookieComponent', $this->Components->Cookie); $this->assertFalse($this->Components->enabled('Cookie'), 'Cookie should be disabled'); } @@ -91,8 +91,8 @@ class ComponentCollectionTest extends CakeTestCase { 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), )); $result = $this->Components->load('TestPlugin.OtherComponent'); - $this->assertType('OtherComponentComponent', $result, 'Component class is wrong.'); - $this->assertType('OtherComponentComponent', $this->Components->OtherComponent, 'Class is wrong'); + $this->assertInstanceOf('OtherComponentComponent', $result, 'Component class is wrong.'); + $this->assertInstanceOf('OtherComponentComponent', $this->Components->OtherComponent, 'Class is wrong'); App::build(); } diff --git a/cake/tests/cases/libs/controller/controller.test.php b/cake/tests/cases/libs/controller/controller.test.php index 39563931b..0ab068cb6 100644 --- a/cake/tests/cases/libs/controller/controller.test.php +++ b/cake/tests/cases/libs/controller/controller.test.php @@ -462,7 +462,7 @@ class ControllerTest extends CakeTestCase { $result = $Controller->loadModel('Comment'); $this->assertTrue($result); - $this->assertType('Comment', $Controller->Comment); + $this->assertInstanceOf('Comment', $Controller->Comment); $this->assertTrue(in_array('Comment', $Controller->modelNames)); ClassRegistry::flush(); @@ -1248,8 +1248,8 @@ class ControllerTest extends CakeTestCase { $Controller = new TestController($request); $Controller->constructClasses(); - $this->assertType('SecurityComponent', $Controller->Security); - $this->assertType('ControllerComment', $Controller->ControllerComment); + $this->assertInstanceOf('SecurityComponent', $Controller->Security); + $this->assertInstanceOf('ControllerComment', $Controller->ControllerComment); } /** diff --git a/cake/tests/cases/libs/controller_test_case.test.php b/cake/tests/cases/libs/controller_test_case.test.php index c457da428..585e07bb2 100644 --- a/cake/tests/cases/libs/controller_test_case.test.php +++ b/cake/tests/cases/libs/controller_test_case.test.php @@ -171,7 +171,7 @@ class ControllerTestCaseTest extends CakeTestCase { ) )); $this->assertNull($Posts->Post->save(array())); - $this->assertIsA($Posts->Post->find('all'), 'array'); + $this->assertInternalType('array', $Posts->Post->find('all')); $Posts = $this->Case->generate('Posts', array( 'models' => array('Post'), @@ -198,7 +198,7 @@ class ControllerTestCaseTest extends CakeTestCase { function testTestAction() { $Controller = $this->Case->generate('TestsApps'); $this->Case->testAction('/tests_apps/index'); - $this->assertIsA($this->Case->controller->viewVars, 'array'); + $this->assertInternalType('array', $this->Case->controller->viewVars); $this->Case->testAction('/tests_apps/set_action'); $results = $this->Case->controller->viewVars; @@ -254,8 +254,7 @@ class ControllerTestCaseTest extends CakeTestCase { include TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; $this->Case->loadRoutes = false; - - $result = $this->Case->testAction('/tests_apps/index.json', array('return' => 'view')); + $result = $this->Case->testAction('/tests_apps/missing_action.json', array('return' => 'view')); } /** diff --git a/cake/tests/cases/libs/debugger.test.php b/cake/tests/cases/libs/debugger.test.php index d6ea5ac8e..21e7d8057 100644 --- a/cake/tests/cases/libs/debugger.test.php +++ b/cake/tests/cases/libs/debugger.test.php @@ -232,7 +232,6 @@ class DebuggerTest extends CakeTestCase { View::$viewVars = array View::$layout = "default" View::$layoutPath = NULL - View::$autoRender = true View::$autoLayout = true View::$ext = ".ctp" View::$subDir = NULL @@ -250,8 +249,9 @@ class DebuggerTest extends CakeTestCase { View::$output = false View::$request = NULL View::$elementCache = "default"'; - $result = str_replace(array("\t", "\r\n", "\n"), "", strtolower($result)); - $expected = str_replace(array("\t", "\r\n", "\n"), "", strtolower($expected)); + + $result = str_replace(array("\t", "\r\n", "\n"), "", $result); + $expected = str_replace(array("\t", "\r\n", "\n"), "", $expected); $this->assertEqual($result, $expected); } diff --git a/cake/tests/cases/libs/error/exception_renderer.test.php b/cake/tests/cases/libs/error/exception_renderer.test.php index 4de432fb9..0b147958f 100644 --- a/cake/tests/cases/libs/error/exception_renderer.test.php +++ b/cake/tests/cases/libs/error/exception_renderer.test.php @@ -265,7 +265,7 @@ class ExceptionRendererTest extends CakeTestCase { $exception = new NotFoundException('Page not found'); $ExceptionRenderer = new ExceptionRenderer($exception); - $this->assertType('CakeErrorController', $ExceptionRenderer->controller); + $this->assertInstanceOf('CakeErrorController', $ExceptionRenderer->controller); $this->assertEquals('error400', $ExceptionRenderer->method); $this->assertEquals($exception, $ExceptionRenderer->error); } @@ -280,7 +280,7 @@ class ExceptionRendererTest extends CakeTestCase { $exception = new MissingActionException('Page not found'); $ExceptionRenderer = new ExceptionRenderer($exception); - $this->assertType('CakeErrorController', $ExceptionRenderer->controller); + $this->assertInstanceOf('CakeErrorController', $ExceptionRenderer->controller); $this->assertEquals('error400', $ExceptionRenderer->method); $this->assertEquals($exception, $ExceptionRenderer->error); } diff --git a/cake/tests/cases/libs/model/model_integration.test.php b/cake/tests/cases/libs/model/model_integration.test.php index a8b5a6796..2770657f1 100644 --- a/cake/tests/cases/libs/model/model_integration.test.php +++ b/cake/tests/cases/libs/model/model_integration.test.php @@ -61,27 +61,27 @@ class ModelIntegrationTest extends BaseModelTest { $Article = new ArticleFeatured(); $this->assertTrue(isset($Article->belongsTo['User'])); $this->assertFalse(property_exists($Article, 'User')); - $this->assertType('User', $Article->User); + $this->assertInstanceOf('User', $Article->User); $this->assertTrue(isset($Article->belongsTo['Category'])); $this->assertFalse(property_exists($Article, 'Category')); $this->assertTrue(isset($Article->Category)); - $this->assertType('Category', $Article->Category); + $this->assertInstanceOf('Category', $Article->Category); $this->assertTrue(isset($Article->hasMany['Comment'])); $this->assertFalse(property_exists($Article, 'Comment')); $this->assertTrue(isset($Article->Comment)); - $this->assertType('Comment', $Article->Comment); + $this->assertInstanceOf('Comment', $Article->Comment); $this->assertTrue(isset($Article->hasAndBelongsToMany['Tag'])); //There was not enough information to setup the association (joinTable and associationForeignKey) //so the model was not lazy loaded $this->assertTrue(property_exists($Article, 'Tag')); $this->assertTrue(isset($Article->Tag)); - $this->assertType('Tag', $Article->Tag); + $this->assertInstanceOf('Tag', $Article->Tag); $this->assertFalse(property_exists($Article, 'ArticleFeaturedsTag')); - $this->assertType('AppModel', $Article->ArticleFeaturedsTag); + $this->assertInstanceOf('AppModel', $Article->ArticleFeaturedsTag); $this->assertEquals($Article->hasAndBelongsToMany['Tag']['joinTable'], 'article_featureds_tags'); $this->assertEquals($Article->hasAndBelongsToMany['Tag']['associationForeignKey'], 'tag_id'); } @@ -97,10 +97,10 @@ class ModelIntegrationTest extends BaseModelTest { $Article = new ArticleB(); $this->assertTrue(isset($Article->hasAndBelongsToMany['TagB'])); $this->assertFalse(property_exists($Article, 'TagB')); - $this->assertType('TagB', $Article->TagB); + $this->assertInstanceOf('TagB', $Article->TagB); $this->assertFalse(property_exists($Article, 'ArticlesTag')); - $this->assertType('AppModel', $Article->ArticlesTag); + $this->assertInstanceOf('AppModel', $Article->ArticlesTag); $UuidTag = new UuidTag(); $this->assertTrue(isset($UuidTag->hasAndBelongsToMany['Fruit'])); @@ -110,7 +110,7 @@ class ModelIntegrationTest extends BaseModelTest { $this->assertFalse(property_exists($UuidTag, 'FruitsUuidTag')); $this->assertTrue(isset($UuidTag->FruitsUuidTag)); - $this->assertType('FruitsUuidTag', $UuidTag->FruitsUuidTag); + $this->assertInstanceOf('FruitsUuidTag', $UuidTag->FruitsUuidTag); } /** @@ -129,7 +129,7 @@ class ModelIntegrationTest extends BaseModelTest { $Article->bindModel(array('belongsTo' => array('User'))); $this->assertTrue(isset($Article->belongsTo['User'])); $this->assertFalse(property_exists($Article, 'User')); - $this->assertType('User', $Article->User); + $this->assertInstanceOf('User', $Article->User); } /** diff --git a/cake/tests/cases/libs/object_collection.test.php b/cake/tests/cases/libs/object_collection.test.php index 3eecfd70d..26ab24951 100644 --- a/cake/tests/cases/libs/object_collection.test.php +++ b/cake/tests/cases/libs/object_collection.test.php @@ -98,8 +98,8 @@ class ObjectCollectionTest extends CakeTestCase { */ function testLoad() { $result = $this->Objects->load('First'); - $this->assertType('FirstGenericObject', $result); - $this->assertType('FirstGenericObject', $this->Objects->First); + $this->assertInstanceOf('FirstGenericObject', $result); + $this->assertInstanceOf('FirstGenericObject', $this->Objects->First); $result = $this->Objects->attached(); $this->assertEquals(array('First'), $result, 'attached() results are wrong.'); diff --git a/cake/tests/cases/libs/session/database_session.test.php b/cake/tests/cases/libs/session/database_session.test.php index 013ea6f2d..deb867db6 100644 --- a/cake/tests/cases/libs/session/database_session.test.php +++ b/cake/tests/cases/libs/session/database_session.test.php @@ -96,7 +96,7 @@ class DatabaseSessionTest extends CakeTestCase { $storage = new DatabaseSession(); $session = ClassRegistry::getObject('session'); - $this->assertType('SessionTestModel', $session); + $this->assertInstanceOf('SessionTestModel', $session); $this->assertEquals('Session', $session->alias); $this->assertEquals('test', $session->useDbConfig); } diff --git a/cake/tests/cases/libs/test_manager.test.php b/cake/tests/cases/libs/test_manager.test.php index ae4c90dc1..b0cbbc6e3 100644 --- a/cake/tests/cases/libs/test_manager.test.php +++ b/cake/tests/cases/libs/test_manager.test.php @@ -106,7 +106,7 @@ class TestManagerTest extends CakeTestCase { $file = 'libs/test_manager.test.php'; $result = $this->TestManager->runTestCase($file, $this->Reporter, true); $this->assertEquals(1, $this->_countFiles); - $this->assertType('PHPUnit_Framework_TestResult', $result); + $this->assertInstanceOf('PHPUnit_Framework_TestResult', $result); } } diff --git a/cake/tests/cases/libs/view/helper.test.php b/cake/tests/cases/libs/view/helper.test.php index 4ef761091..025dffae1 100644 --- a/cake/tests/cases/libs/view/helper.test.php +++ b/cake/tests/cases/libs/view/helper.test.php @@ -858,8 +858,8 @@ class HelperTest extends CakeTestCase { 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), )); $Helper = new TestHelper($this->View); - $this->assertType('OtherHelperHelper', $Helper->OtherHelper); - $this->assertType('HtmlHelper', $Helper->Html); + $this->assertInstanceOf('OtherHelperHelper', $Helper->OtherHelper); + $this->assertInstanceOf('HtmlHelper', $Helper->Html); App::build(); } diff --git a/cake/tests/cases/libs/view/helper_collection.test.php b/cake/tests/cases/libs/view/helper_collection.test.php index d5f1480dd..d3b7698fe 100644 --- a/cake/tests/cases/libs/view/helper_collection.test.php +++ b/cake/tests/cases/libs/view/helper_collection.test.php @@ -48,8 +48,8 @@ class HelperCollectionTest extends CakeTestCase { */ function testLoad() { $result = $this->Helpers->load('Html'); - $this->assertType('HtmlHelper', $result); - $this->assertType('HtmlHelper', $this->Helpers->Html); + $this->assertInstanceOf('HtmlHelper', $result); + $this->assertInstanceOf('HtmlHelper', $this->Helpers->Html); $result = $this->Helpers->attached(); $this->assertEquals(array('Html'), $result, 'attached() results are wrong.'); @@ -64,8 +64,8 @@ class HelperCollectionTest extends CakeTestCase { */ function testLoadWithEnabledFalse() { $result = $this->Helpers->load('Html', array('enabled' => false)); - $this->assertType('HtmlHelper', $result); - $this->assertType('HtmlHelper', $this->Helpers->Html); + $this->assertInstanceOf('HtmlHelper', $result); + $this->assertInstanceOf('HtmlHelper', $this->Helpers->Html); $this->assertFalse($this->Helpers->enabled('Html'), 'Html should be disabled'); } @@ -90,8 +90,8 @@ class HelperCollectionTest extends CakeTestCase { 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), )); $result = $this->Helpers->load('TestPlugin.OtherHelper'); - $this->assertType('OtherHelperHelper', $result, 'Helper class is wrong.'); - $this->assertType('OtherHelperHelper', $this->Helpers->OtherHelper, 'Class is wrong'); + $this->assertInstanceOf('OtherHelperHelper', $result, 'Helper class is wrong.'); + $this->assertInstanceOf('OtherHelperHelper', $this->Helpers->OtherHelper, 'Class is wrong'); App::build(); } diff --git a/cake/tests/cases/libs/view/view.test.php b/cake/tests/cases/libs/view/view.test.php index e50934dd9..30ff72866 100644 --- a/cake/tests/cases/libs/view/view.test.php +++ b/cake/tests/cases/libs/view/view.test.php @@ -546,7 +546,7 @@ class ViewTest extends CakeTestCase { function test__get() { $View = new View($this->PostsController); $View->loadHelper('Html'); - $this->assertType('HtmlHelper', $View->Html); + $this->assertInstanceOf('HtmlHelper', $View->Html); } /** @@ -561,8 +561,8 @@ class ViewTest extends CakeTestCase { $View->helpers = array('Html', 'Form'); $View->loadHelpers(); - $this->assertType('HtmlHelper', $View->Html, 'Object type is wrong.'); - $this->assertType('FormHelper', $View->Form, 'Object type is wrong.'); + $this->assertInstanceOf('HtmlHelper', $View->Html, 'Object type is wrong.'); + $this->assertInstanceOf('FormHelper', $View->Form, 'Object type is wrong.'); } /** diff --git a/cake/tests/fixtures/fixturized_test_case.php b/cake/tests/fixtures/fixturized_test_case.php index c9b932b3e..ad2486784 100644 --- a/cake/tests/fixtures/fixturized_test_case.php +++ b/cake/tests/fixtures/fixturized_test_case.php @@ -22,7 +22,7 @@ class FixturizedTestCase extends CakeTestCase { * @return void */ public function testFixturePresent() { - $this->assertType('CakeFixtureManager', $this->fixtureManager); + $this->assertInstanceOf('CakeFixtureManager', $this->fixtureManager); } /** diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index 184dc7912..1a8131679 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -494,7 +494,7 @@ class CakeTestCase extends PHPUnit_Framework_TestCase { * @return void */ protected function assertIsA($object, $type, $message = '') { - return $this->assertType($type, $object, $message); + return $this->assertInstanceOf($type, $object, $message); } /** diff --git a/cake/tests/lib/controller_test_case.php b/cake/tests/lib/controller_test_case.php index 63188b059..91940f928 100644 --- a/cake/tests/lib/controller_test_case.php +++ b/cake/tests/lib/controller_test_case.php @@ -65,10 +65,9 @@ class ControllerTestDispatcher extends Dispatcher { * Loads routes and resets if the test case dictates it should * * @return void - * @access private */ - protected function __loadRoutes() { - parent::__loadRoutes(); + protected function _loadRoutes() { + parent::_loadRoutes(); if (!$this->loadRoutes) { Router::reload(); }