diff --git a/lib/Cake/Console/Templates/default/classes/test.ctp b/lib/Cake/Console/Templates/default/classes/test.ctp index ecf8ea8a5..78fe39799 100644 --- a/lib/Cake/Console/Templates/default/classes/test.ctp +++ b/lib/Cake/Console/Templates/default/classes/test.ctp @@ -54,7 +54,7 @@ class Test extends { * Test Case * */ -class TestCase extends CakeTestCase { +class Test extends CakeTestCase { /** * Fixtures diff --git a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php index f5f9177cd..37f854b2e 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php @@ -437,7 +437,7 @@ class TestTaskTest extends CakeTestCase { $result = $this->Task->bake('Model', 'TestTaskArticle'); $this->assertContains("App::uses('TestTaskArticle', 'Model')", $result); - $this->assertContains('class TestTaskArticleTestCase extends CakeTestCase', $result); + $this->assertContains('class TestTaskArticleTest extends CakeTestCase', $result); $this->assertContains('function setUp()', $result); $this->assertContains("\$this->TestTaskArticle = ClassRegistry::init('TestTaskArticle')", $result); @@ -468,7 +468,7 @@ class TestTaskTest extends CakeTestCase { $result = $this->Task->bake('Controller', 'TestTaskComments'); $this->assertContains("App::uses('TestTaskCommentsController', 'Controller')", $result); - $this->assertContains('class TestTaskCommentsControllerTestCase extends CakeTestCase', $result); + $this->assertContains('class TestTaskCommentsControllerTest extends CakeTestCase', $result); $this->assertContains('class TestTestTaskCommentsController extends TestTaskCommentsController', $result); $this->assertContains('public $autoRender = false', $result); @@ -655,7 +655,7 @@ class TestTaskTest extends CakeTestCase { $this->Task->expects($this->once())->method('createFile') ->with( $this->anything(), - $this->stringContains('class TestTaskTagTestCase extends CakeTestCase') + $this->stringContains('class TestTaskTagTest extends CakeTestCase') ); $this->Task->execute(); } @@ -671,7 +671,7 @@ class TestTaskTest extends CakeTestCase { $this->Task->expects($this->once())->method('createFile') ->with( $this->anything(), - $this->stringContains('class TestTaskTagTestCase extends CakeTestCase') + $this->stringContains('class TestTaskTagTest extends CakeTestCase') ); $this->Task->expects($this->any())->method('isLoadableClass')->will($this->returnValue(true)); $this->Task->execute(); @@ -688,7 +688,7 @@ class TestTaskTest extends CakeTestCase { $this->Task->expects($this->once())->method('createFile') ->with( $this->anything(), - $this->stringContains('class TestTaskTagTestCase extends CakeTestCase') + $this->stringContains('class TestTaskTagTest extends CakeTestCase') ); $this->Task->expects($this->any())->method('isLoadableClass')->will($this->returnValue(true)); $this->Task->execute(); diff --git a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php index 792487644..87c5bd7d6 100644 --- a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php @@ -518,10 +518,10 @@ class CookieComponentTest extends CakeTestCase { 'Empty' => '', 'String' => '{"somewhat:"broken"}' ); - $this->assertEqual(array('name' => 'value'), $this->Cookie->read('JSON')); - $this->assertEqual('value', $this->Cookie->read('JSON.name')); - $this->assertEqual('', $this->Cookie->read('Empty')); - $this->assertEqual('{"somewhat:"broken"}', $this->Cookie->read('String')); + $this->assertEquals(array('name' => 'value'), $this->Cookie->read('JSON')); + $this->assertEquals('value', $this->Cookie->read('JSON.name')); + $this->assertEquals('', $this->Cookie->read('Empty')); + $this->assertEquals('{"somewhat:"broken"}', $this->Cookie->read('String')); } /** diff --git a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php index a28655cdc..d280f7fac 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php @@ -64,7 +64,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'I18n__content.locale' => 'eng' ) )); - $this->assertEqual(3, $result); + $this->assertEquals(3, $result); } /** diff --git a/lib/Cake/Test/Case/Model/ModelWriteTest.php b/lib/Cake/Test/Case/Model/ModelWriteTest.php index 984e5649d..72c3309d8 100644 --- a/lib/Cake/Test/Case/Model/ModelWriteTest.php +++ b/lib/Cake/Test/Case/Model/ModelWriteTest.php @@ -6370,7 +6370,7 @@ class ModelWriteTest extends BaseModelTest { $TestModel = new Post(); $result = $TestModel->find('all'); - $this->assertEqual(3, count($result)); + $this->assertEquals(3, count($result)); $this->assertFalse(isset($result[3])); $ts = date('Y-m-d H:i:s'); @@ -6411,7 +6411,7 @@ class ModelWriteTest extends BaseModelTest { ), ); $this->assertEquals($expected, $result[3]); - $this->assertEqual(4, count($result)); + $this->assertEquals(4, count($result)); $this->assertEquals('', $result[3]['Post']['body']); $this->assertEquals('working', $result[3]['Author']['test']); @@ -6542,7 +6542,7 @@ class ModelWriteTest extends BaseModelTest { $TestModel->recursive = 2; $result = $TestModel->find('all'); - $this->assertEqual(3, count($result)); + $this->assertEquals(3, count($result)); $this->assertFalse(isset($result[3])); $ts = date('Y-m-d H:i:s'); diff --git a/lib/Cake/Test/Case/Network/CakeResponseTest.php b/lib/Cake/Test/Case/Network/CakeResponseTest.php index f27ac1f1f..b3df124f6 100644 --- a/lib/Cake/Test/Case/Network/CakeResponseTest.php +++ b/lib/Cake/Test/Case/Network/CakeResponseTest.php @@ -943,7 +943,7 @@ class CakeResponseTest extends CakeTestCase { 'secure' => false, 'httpOnly' => false); $result = $response->cookie('CakeTestCookie[Testing]'); - $this->assertEqual($result, $expected); + $this->assertEquals($result, $expected); $cookie = array( 'name' => 'CakeTestCookie[Testing2]', @@ -975,7 +975,7 @@ class CakeResponseTest extends CakeTestCase { ); $result = $response->cookie(); - $this->assertEqual($result, $expected); + $this->assertEquals($result, $expected); $cookie = $expected['CakeTestCookie[Testing]']; $cookie['value'] = 'test'; @@ -1002,7 +1002,7 @@ class CakeResponseTest extends CakeTestCase { ); $result = $response->cookie(); - $this->assertEqual($result, $expected); + $this->assertEquals($result, $expected); } } diff --git a/lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php b/lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php index 7be789357..4438d47ec 100644 --- a/lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php +++ b/lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php @@ -25,7 +25,7 @@ App::uses('Router', 'Routing'); * * @package Cake.Test.Case.Routing.Route */ -class PluginShortRouteTestCase extends CakeTestCase { +class PluginShortRouteTest extends CakeTestCase { /** * setUp method diff --git a/lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php b/lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php index 1e6666740..33b4276b0 100644 --- a/lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php +++ b/lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php @@ -26,7 +26,7 @@ App::uses('Router', 'Routing'); * * @package Cake.Test.Case.Routing.Route */ -class RedirectRouteTestCase extends CakeTestCase { +class RedirectRouteTest extends CakeTestCase { /** * setUp method diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index 55d4e5d02..d45cafa17 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -2551,8 +2551,8 @@ class RouterTest extends CakeTestCase { $routeClass = 'TestDefaultRouteClass'; Router::defaultRouteClass($routeClass); - $this->assertEqual($routeClass, Router::defaultRouteClass()); - $this->assertEqual($routeClass, Router::defaultRouteClass(null)); + $this->assertEquals($routeClass, Router::defaultRouteClass()); + $this->assertEquals($routeClass, Router::defaultRouteClass(null)); } /** diff --git a/lib/Cake/Test/Case/Utility/CakeNumberTest.php b/lib/Cake/Test/Case/Utility/CakeNumberTest.php index 1d0acdcf3..1895c4db2 100644 --- a/lib/Cake/Test/Case/Utility/CakeNumberTest.php +++ b/lib/Cake/Test/Case/Utility/CakeNumberTest.php @@ -87,7 +87,7 @@ class CakeNumberTest extends CakeTestCase { 'before' => '', )); $expected = '5 199 100&001'; - $this->assertEqual($expected, $result); + $this->assertEquals($expected, $result); $value = 1000.45; $result = $this->Number->format($value, array( @@ -96,7 +96,7 @@ class CakeNumberTest extends CakeTestCase { 'escape' => false, )); $expected = '$1,,000.a45'; - $this->assertEqual($expected, $result); + $this->assertEquals($expected, $result); $value = 519919827593784.00; $this->Number->addFormat('RUR', array( diff --git a/lib/Cake/Test/Case/Utility/HashTest.php b/lib/Cake/Test/Case/Utility/HashTest.php index 588a8d0cb..5305cb889 100644 --- a/lib/Cake/Test/Case/Utility/HashTest.php +++ b/lib/Cake/Test/Case/Utility/HashTest.php @@ -2088,7 +2088,7 @@ class HashTest extends CakeTestCase { $data = array('My', 'Array', 'To', 'Flatten'); $flat = Hash::flatten($data); $result = Hash::expand($flat); - $this->assertEqual($data, $result); + $this->assertEquals($data, $result); $data = array( '0.Post.id' => '1', '0.Post.author_id' => '1', '0.Post.title' => 'First Post', '0.Author.id' => '1', @@ -2107,7 +2107,7 @@ class HashTest extends CakeTestCase { 'Author' => array('id' => '3', 'user' => 'larry', 'password' => null), ) ); - $this->assertEqual($result, $expected); + $this->assertEquals($result, $expected); $data = array( '0/Post/id' => 1, @@ -2122,7 +2122,7 @@ class HashTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEquals($result, $expected); } } diff --git a/lib/Cake/Test/Case/Utility/SetTest.php b/lib/Cake/Test/Case/Utility/SetTest.php index daa466661..41f781bdd 100644 --- a/lib/Cake/Test/Case/Utility/SetTest.php +++ b/lib/Cake/Test/Case/Utility/SetTest.php @@ -3034,7 +3034,7 @@ class SetTest extends CakeTestCase { $data = array('My', 'Array', 'To', 'Flatten'); $flat = Set::flatten($data); $result = Set::expand($flat); - $this->assertEqual($data, $result); + $this->assertEquals($data, $result); } /** diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index aa7f40093..1accaa471 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -1492,12 +1492,12 @@ class FormHelperTest extends CakeTestCase { $this->Form->setEntity('Contact.1.email'); $result = $this->Form->tagIsInvalid(); $expected = false; - $this->assertIdentical($expected, $result); + $this->assertSame($expected, $result); $this->Form->setEntity('Contact.0.name'); $result = $this->Form->tagIsInvalid(); $expected = false; - $this->assertIdentical($expected, $result); + $this->assertSame($expected, $result); } /** diff --git a/lib/Cake/Test/Case/View/HelperTest.php b/lib/Cake/Test/Case/View/HelperTest.php index 5cb5801d6..63f32b0b7 100644 --- a/lib/Cake/Test/Case/View/HelperTest.php +++ b/lib/Cake/Test/Case/View/HelperTest.php @@ -620,7 +620,7 @@ class HelperTest extends CakeTestCase { $this->assertEquals(FULL_BASE_URL . '/foo.jpg', $result); $result = $this->Helper->assetUrl('style', array('ext' => '.css')); - $this->assertEqual('style.css', $result); + $this->assertEquals('style.css', $result); $result = $this->Helper->assetUrl('foo.jpg?one=two&three=four'); $this->assertEquals('foo.jpg?one=two&three=four', $result); @@ -636,10 +636,10 @@ class HelperTest extends CakeTestCase { CakePlugin::load('TestPlugin'); $result = $this->Helper->assetUrl('TestPlugin.style', array('ext' => '.css')); - $this->assertEqual('test_plugin/style.css', $result); + $this->assertEquals('test_plugin/style.css', $result); $result = $this->Helper->assetUrl('TestPlugin.style', array('ext' => '.css', 'plugin' => false)); - $this->assertEqual('TestPlugin.style.css', $result); + $this->assertEquals('TestPlugin.style.css', $result); CakePlugin::unload('TestPlugin'); } diff --git a/lib/Cake/Test/Case/View/JsonViewTest.php b/lib/Cake/Test/Case/View/JsonViewTest.php index 9515a9472..f384ee6ba 100644 --- a/lib/Cake/Test/Case/View/JsonViewTest.php +++ b/lib/Cake/Test/Case/View/JsonViewTest.php @@ -43,8 +43,8 @@ class JsonViewTest extends CakeTestCase { $View = new JsonView($Controller); $output = $View->render(false); - $this->assertIdentical(json_encode($data), $output); - $this->assertIdentical('application/json', $Response->type()); + $this->assertSame(json_encode($data), $output); + $this->assertSame('application/json', $Response->type()); } /** @@ -62,8 +62,8 @@ class JsonViewTest extends CakeTestCase { $View = new JsonView($Controller); $output = $View->render(false); - $this->assertIdentical(json_encode(array('no' => $data['no'], 'user' => $data['user'])), $output); - $this->assertIdentical('application/json', $Response->type()); + $this->assertSame(json_encode(array('no' => $data['no'], 'user' => $data['user'])), $output); + $this->assertSame('application/json', $Response->type()); } /** @@ -94,8 +94,8 @@ class JsonViewTest extends CakeTestCase { $output = $View->render('index'); $expected = json_encode(array('user' => 'fake', 'list' => array('item1', 'item2'))); - $this->assertIdentical($expected, $output); - $this->assertIdentical('application/json', $Response->type()); + $this->assertSame($expected, $output); + $this->assertSame('application/json', $Response->type()); } } diff --git a/lib/Cake/Test/Case/View/ViewTest.php b/lib/Cake/Test/Case/View/ViewTest.php index 11bbb44a1..b3dbb656c 100644 --- a/lib/Cake/Test/Case/View/ViewTest.php +++ b/lib/Cake/Test/Case/View/ViewTest.php @@ -640,8 +640,8 @@ class ViewTest extends CakeTestCase { $this->assertEquals('this is the plugin element using params[plugin]', $result); $result = $this->View->element('test_plugin.plugin_element'); - $this->assertPattern('/Not Found:/', $result); - $this->assertPattern('/test_plugin.plugin_element/', $result); + $this->assertRegExp('/Not Found:/', $result); + $this->assertRegExp('/test_plugin.plugin_element/', $result); $this->View->plugin = 'TestPlugin'; $result = $this->View->element('test_plugin_element'); @@ -1040,7 +1040,7 @@ class ViewTest extends CakeTestCase { $this->assertRegExp('/Posts(\/|\\\)index.ctp/', $result); $result = $View->getViewFileName('TestPlugin.index'); - $this->assertPattern('/Posts(\/|\\\)index.ctp/', $result); + $this->assertRegExp('/Posts(\/|\\\)index.ctp/', $result); $result = $View->getViewFileName('/Pages/home'); $this->assertRegExp('/Pages(\/|\\\)home.ctp/', $result); diff --git a/lib/Cake/Test/Case/View/XmlViewTest.php b/lib/Cake/Test/Case/View/XmlViewTest.php index 055894525..51243ccb1 100644 --- a/lib/Cake/Test/Case/View/XmlViewTest.php +++ b/lib/Cake/Test/Case/View/XmlViewTest.php @@ -45,7 +45,7 @@ class XmlViewTest extends CakeTestCase { $expected = '' . "\n" . 'user1user2'; $this->assertTextEquals($expected, trim($output)); - $this->assertIdentical('application/xml', $Response->type()); + $this->assertSame('application/xml', $Response->type()); } /** @@ -66,8 +66,8 @@ class XmlViewTest extends CakeTestCase { $expected = array( 'response' => array('no' => $data['no'], 'user' => $data['user']) ); - $this->assertIdentical(Xml::build($expected)->asXML(), $output); - $this->assertIdentical('application/xml', $Response->type()); + $this->assertSame(Xml::build($expected)->asXML(), $output); + $this->assertSame('application/xml', $Response->type()); } /** @@ -101,8 +101,8 @@ class XmlViewTest extends CakeTestCase { $output = $View->render('index'); $expected = 'user1user2'; - $this->assertIdentical($expected, str_replace(array("\r", "\n"), '', $output)); - $this->assertIdentical('application/xml', $Response->type()); + $this->assertSame($expected, str_replace(array("\r", "\n"), '', $output)); + $this->assertSame('application/xml', $Response->type()); $this->assertInstanceOf('HelperCollection', $View->Helpers); }