Skip to content

Commit

Permalink
Update assertEqual to assertEquals.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 23, 2011
1 parent b02155e commit 3022552
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
Expand Up @@ -283,7 +283,7 @@ public function testFilePathGenerationModelRepeated() {
public function testMethodIntrospection() {
$result = $this->Task->getTestableMethods('TestTaskArticle');
$expected = array('dosomething', 'dosomethingelse');
$this->assertEqual(array_map('strtolower', $result), $expected);
$this->assertEquals($expected, array_map('strtolower', $result));
}

/**
Expand All @@ -297,7 +297,7 @@ public function testFixtureArrayGenerationFromModel() {
$expected = array('plugin.test_task.test_task_comment', 'app.articles_tags',
'app.test_task_article', 'app.test_task_tag');

$this->assertEqual(sort($result), sort($expected));
$this->assertEquals(sort($expected), sort($result));
}

/**
Expand All @@ -311,7 +311,7 @@ public function testFixtureArrayGenerationFromController() {
$expected = array('plugin.test_task.test_task_comment', 'app.articles_tags',
'app.test_task_article', 'app.test_task_tag');

$this->assertEqual(sort($result), sort($expected));
$this->assertEquals(sort($result), sort($expected));
}

/**
Expand All @@ -327,7 +327,7 @@ public function testGetObjectType() {
$this->Task->getObjectType();

$result = $this->Task->getObjectType();
$this->assertEqual($result, $this->Task->classTypes['Controller']);
$this->assertEquals($this->Task->classTypes['Controller'], $result);
}

/**
Expand Down Expand Up @@ -367,11 +367,11 @@ public function testGetClassName() {
$this->Task->expects($this->at(1))->method('in')->will($this->returnValue(1));

$result = $this->Task->getClassName('Model');
$this->assertEqual($result, 'MyCustomClass');
$this->assertEquals($result, 'MyCustomClass');

$result = $this->Task->getClassName('Model');
$options = App::objects('model');
$this->assertEqual($result, $options[0]);
$this->assertEquals($options[0], $result);
}

/**
Expand All @@ -386,7 +386,7 @@ public function testGetUserFixtures() {

$result = $this->Task->getUserFixtures();
$expected = array('app.pizza', 'app.topping', 'app.side_dish');
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);
}

/**
Expand All @@ -396,28 +396,28 @@ public function testGetUserFixtures() {
*/
public function testGetRealClassname() {
$result = $this->Task->getRealClassname('Model', 'Post');
$this->assertEqual($result, 'Post');
$this->assertEquals('Post', $result);

$result = $this->Task->getRealClassname('Controller', 'Posts');
$this->assertEqual($result, 'PostsController');
$this->assertEquals('PostsController', $result);

$result = $this->Task->getRealClassname('Controller', 'PostsController');
$this->assertEqual($result, 'PostsController');
$this->assertEquals('PostsController', $result);

$result = $this->Task->getRealClassname('Helper', 'Form');
$this->assertEqual($result, 'FormHelper');
$this->assertEquals('FormHelper', $result);

$result = $this->Task->getRealClassname('Helper', 'FormHelper');
$this->assertEqual($result, 'FormHelper');
$this->assertEquals('FormHelper', $result);

$result = $this->Task->getRealClassname('Behavior', 'Containable');
$this->assertEqual($result, 'ContainableBehavior');
$this->assertEquals('ContainableBehavior', $result);

$result = $this->Task->getRealClassname('Behavior', 'ContainableBehavior');
$this->assertEqual($result, 'ContainableBehavior');
$this->assertEquals('ContainableBehavior', $result);

$result = $this->Task->getRealClassname('Component', 'Auth');
$this->assertEqual($result, 'AuthComponent');
$this->assertEquals('AuthComponent', $result);
}

/**
Expand Down Expand Up @@ -491,15 +491,15 @@ public function testBakeControllerTest() {
public function testGenerateConstructor() {
$result = $this->Task->generateConstructor('controller', 'PostsController');
$expected = "new TestPostsController();\n\t\t\$this->Posts->constructClasses();\n";
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);

$result = $this->Task->generateConstructor('model', 'Post');
$expected = "ClassRegistry::init('Post');\n";
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);

$result = $this->Task->generateConstructor('helper', 'FormHelper');
$expected = "new FormHelper();\n";
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);
}

/**
Expand Down Expand Up @@ -572,29 +572,29 @@ public function testTestCaseFileName() {

$result = $this->Task->testCaseFileName('Model', 'Post');
$expected = $this->Task->path . 'Case' . DS . 'Model' . DS . 'PostTest.php';
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);

$result = $this->Task->testCaseFileName('Helper', 'Form');
$expected = $this->Task->path . 'Case' . DS . 'View' . DS . 'Helper' . DS . 'FormHelperTest.php';
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);

$result = $this->Task->testCaseFileName('Controller', 'Posts');
$expected = $this->Task->path . 'Case' . DS . 'Controller' . DS . 'PostsControllerTest.php';
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);

$result = $this->Task->testCaseFileName('Behavior', 'Containable');
$expected = $this->Task->path . 'Case' . DS . 'Model' . DS . 'Behavior' . DS . 'ContainableBehaviorTest.php';
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);

$result = $this->Task->testCaseFileName('Component', 'Auth');
$expected = $this->Task->path . 'Case' . DS . 'Controller' . DS . 'Component' . DS . 'AuthComponentTest.php';
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);

CakePlugin::load('TestTest', array('path' => APP . 'Plugin' . DS . 'TestTest' . DS ));
$this->Task->plugin = 'TestTest';
$result = $this->Task->testCaseFileName('Model', 'Post');
$expected = APP . 'Plugin' . DS . 'TestTest' . DS . 'Test' . DS . 'Case' . DS . 'Model' . DS . 'PostTest.php';
$this->assertEqual($expected, $result);
$this->assertEquals($expected, $result);
}

/**
Expand Down

0 comments on commit 3022552

Please sign in to comment.