Permalink
Browse files

updating usage of assertEqual -> assertEquals

  • Loading branch information...
1 parent 8444911 commit a88ca54a8ddbd1d0e220cb9f867c79642e370d32 @rchavik rchavik committed Dec 13, 2011
@@ -207,7 +207,7 @@ public function testCompatibleBuild() {
*/
public function testBuildPackage() {
$paths = App::path('Service');
- $this->assertEqual(array(), $paths);
+ $this->assertEquals(array(), $paths);
App::build(array(
'Service' => array(
@@ -43,13 +43,13 @@ function testModelDatasources() {
$this->loadFixtures('Player', 'Guild', 'GuildsPlayer');
$Player = ClassRegistry::init('Player');
- $this->assertEqual('test', $Player->useDbConfig);
- $this->assertEqual('test', $Player->Guild->useDbConfig);
- $this->assertEqual('test2', $Player->GuildsPlayer->useDbConfig);
+ $this->assertEquals('test', $Player->useDbConfig);
+ $this->assertEquals('test', $Player->Guild->useDbConfig);
+ $this->assertEquals('test2', $Player->GuildsPlayer->useDbConfig);
- $this->assertEqual('test', $Player->getDataSource()->configKeyName);
- $this->assertEqual('test', $Player->Guild->getDataSource()->configKeyName);
- $this->assertEqual('test2', $Player->GuildsPlayer->getDataSource()->configKeyName);
+ $this->assertEquals('test', $Player->getDataSource()->configKeyName);
+ $this->assertEquals('test', $Player->Guild->getDataSource()->configKeyName);
+ $this->assertEquals('test2', $Player->GuildsPlayer->getDataSource()->configKeyName);
}
function testHabtmFind() {
@@ -67,19 +67,19 @@ function testHabtmFind() {
),
),
));
- $this->assertEqual(4, count($players));
+ $this->assertEquals(4, count($players));
$wizards = Set::extract('/Guild[name=Wizards]', $players);
- $this->assertEqual(1, count($wizards));
+ $this->assertEquals(1, count($wizards));
$players = $Player->find('all', array(
'fields' => array('id', 'name'),
'conditions' => array(
'Player.id' => 1,
),
));
- $this->assertEqual(1, count($players));
+ $this->assertEquals(1, count($players));
$wizards = Set::extract('/Guild', $players);
- $this->assertEqual(2, count($wizards));
+ $this->assertEquals(2, count($wizards));
}
@@ -88,7 +88,7 @@ function testHabtmSave() {
$Player =& ClassRegistry::init('Player');
$players = $Player->find('count');
- $this->assertEqual(4, $players);
+ $this->assertEquals(4, $players);
$player = $Player->create(array(
'name' => 'rchavik',
@@ -97,10 +97,10 @@ function testHabtmSave() {
$results = $Player->saveAll($player, array('validate' => 'first'));
$this->assertNotEqual(false, $results);
$count = $Player->find('count');
- $this->assertEqual(5, $count);
+ $this->assertEquals(5, $count);
$count = $Player->GuildsPlayer->find('count');
- $this->assertEqual(3, $count);
+ $this->assertEquals(3, $count);
$player = $Player->findByName('rchavik');
$this->assertEmpty($player['Guild']);
@@ -109,7 +109,7 @@ function testHabtmSave() {
$Player->save($player);
$player = $Player->findByName('rchavik');
- $this->assertEqual(3, count($player['Guild']));
+ $this->assertEquals(3, count($player['Guild']));
$players = $Player->find('all', array(
'contain' => array(
@@ -120,7 +120,7 @@ function testHabtmSave() {
));
$rangers = Set::extract('/Guild[name=Rangers]', $players);
- $this->assertEqual(2, count($rangers));
+ $this->assertEquals(2, count($rangers));
}
function testHabtmWithThreeDatabases() {
@@ -142,11 +142,11 @@ function testHabtmWithThreeDatabases() {
),
),
), false);
- $this->assertEqual('test', $Player->useDbConfig);
- $this->assertEqual('test2', $Player->Armor->useDbConfig);
- $this->assertEqual('test_database_three', $Player->ArmorsPlayer->useDbConfig);
+ $this->assertEquals('test', $Player->useDbConfig);
+ $this->assertEquals('test2', $Player->Armor->useDbConfig);
+ $this->assertEquals('test_database_three', $Player->ArmorsPlayer->useDbConfig);
$players = $Player->find('count');
- $this->assertEqual(4, $players);
+ $this->assertEquals(4, $players);
$spongebob = $Player->create(array(
'id' => 10,
@@ -169,15 +169,15 @@ function testHabtmWithThreeDatabases() {
);
unset($result['Player']['created']);
unset($result['Player']['updated']);
- $this->assertEqual($expected, $result);
+ $this->assertEquals($expected, $result);
$spongebob = $Player->find('all', array(
'conditions' => array(
'Player.id' => 10,
)
));
$spongeBobsArmors = Set::extract('/Armor', $spongebob);
- $this->assertEqual(4, count($spongeBobsArmors));
+ $this->assertEquals(4, count($spongeBobsArmors));
}
}
@@ -2243,18 +2243,18 @@ public function testMultischemaFixture() {
$this->loadFixtures('Player', 'Guild', 'GuildsPlayer');
$Player = ClassRegistry::init('Player');
- $this->assertEqual($Player->useDbConfig, 'test');
- $this->assertEqual($Player->Guild->useDbConfig, 'test');
- $this->assertEqual($Player->Guild->GuildsPlayer->useDbConfig, 'test2');
- $this->assertEqual($Player->GuildsPlayer->useDbConfig, 'test2');
+ $this->assertEquals($Player->useDbConfig, 'test');
+ $this->assertEquals($Player->Guild->useDbConfig, 'test');
+ $this->assertEquals($Player->Guild->GuildsPlayer->useDbConfig, 'test2');
+ $this->assertEquals($Player->GuildsPlayer->useDbConfig, 'test2');
$players = $Player->find('all', array('recursive' => -1));
$guilds = $Player->Guild->find('all', array('recursive' => -1));
$guildsPlayers = $Player->GuildsPlayer->find('all', array('recursive' => -1));
- $this->assertEqual(true, count($players) > 1);
- $this->assertEqual(true, count($guilds) > 1);
- $this->assertEqual(true, count($guildsPlayers) > 1);
+ $this->assertEquals(true, count($players) > 1);
+ $this->assertEquals(true, count($guilds) > 1);
+ $this->assertEquals(true, count($guildsPlayers) > 1);
}
/**
@@ -2281,27 +2281,27 @@ public function testMultischemaFixtureWithThreeDatabases() {
),
),
), false);
- $this->assertEqual('test', $Player->useDbConfig);
- $this->assertEqual('test', $Player->Guild->useDbConfig);
- $this->assertEqual('test2', $Player->Guild->GuildsPlayer->useDbConfig);
- $this->assertEqual('test2', $Player->GuildsPlayer->useDbConfig);
- $this->assertEqual('test2', $Player->Armor->useDbConfig);
- $this->assertEqual('test_database_three', $Player->Armor->ArmorsPlayer->useDbConfig);
- $this->assertEqual('test', $Player->getDataSource()->configKeyName);
- $this->assertEqual('test', $Player->Guild->getDataSource()->configKeyName);
- $this->assertEqual('test2', $Player->GuildsPlayer->getDataSource()->configKeyName);
- $this->assertEqual('test2', $Player->Armor->getDataSource()->configKeyName);
- $this->assertEqual('test_database_three', $Player->Armor->ArmorsPlayer->getDataSource()->configKeyName);
+ $this->assertEquals('test', $Player->useDbConfig);
+ $this->assertEquals('test', $Player->Guild->useDbConfig);
+ $this->assertEquals('test2', $Player->Guild->GuildsPlayer->useDbConfig);
+ $this->assertEquals('test2', $Player->GuildsPlayer->useDbConfig);
+ $this->assertEquals('test2', $Player->Armor->useDbConfig);
+ $this->assertEquals('test_database_three', $Player->Armor->ArmorsPlayer->useDbConfig);
+ $this->assertEquals('test', $Player->getDataSource()->configKeyName);
+ $this->assertEquals('test', $Player->Guild->getDataSource()->configKeyName);
+ $this->assertEquals('test2', $Player->GuildsPlayer->getDataSource()->configKeyName);
+ $this->assertEquals('test2', $Player->Armor->getDataSource()->configKeyName);
+ $this->assertEquals('test_database_three', $Player->Armor->ArmorsPlayer->getDataSource()->configKeyName);
$players = $Player->find('all', array('recursive' => -1));
$guilds = $Player->Guild->find('all', array('recursive' => -1));
$guildsPlayers = $Player->GuildsPlayer->find('all', array('recursive' => -1));
$armorsPlayers = $Player->ArmorsPlayer->find('all', array('recursive' => -1));
- $this->assertEqual(true, count($players) > 1);
- $this->assertEqual(true, count($guilds) > 1);
- $this->assertEqual(true, count($guildsPlayers) > 1);
- $this->assertEqual(true, count($armorsPlayers) > 1);
+ $this->assertEquals(true, count($players) > 1);
+ $this->assertEquals(true, count($guilds) > 1);
+ $this->assertEquals(true, count($guildsPlayers) > 1);
+ $this->assertEquals(true, count($armorsPlayers) > 1);
}
}
@@ -240,12 +240,12 @@ public function testAutoLinkEscape() {
$text = 'This is a <b>test</b> text with URL http://www.cakephp.org';
$expected = 'This is a &lt;b&gt;test&lt;/b&gt; text with URL <a href="http://www.cakephp.org">http://www.cakephp.org</a>';
$result = $this->Text->autoLink($text);
- $this->assertEqual($expected, $result);
+ $this->assertEquals($expected, $result);
$text = 'This is a <b>test</b> text with URL http://www.cakephp.org';
$expected = 'This is a <b>test</b> text with URL <a href="http://www.cakephp.org">http://www.cakephp.org</a>';
$result = $this->Text->autoLink($text, array('escape' => false));
- $this->assertEqual($expected, $result);
+ $this->assertEquals($expected, $result);
}
/**

0 comments on commit a88ca54

Please sign in to comment.