From 9844da8e9995ff3ae96a8c547c6c25788d82ac68 Mon Sep 17 00:00:00 2001 From: euromark Date: Wed, 25 Sep 2013 20:58:29 +0200 Subject: [PATCH 1/2] Don't use comp. wrappers anymore. --- lib/Cake/Test/Case/Model/CakeSchemaTest.php | 2 +- lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php | 2 +- lib/Cake/Test/Case/View/Helper/FormHelperTest.php | 2 +- lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php | 2 +- lib/Cake/Test/Case/View/ViewTest.php | 2 +- lib/Cake/Test/Fixture/AssertTagsTestCase.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php index 07afe7fee..244568adc 100644 --- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php +++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php @@ -703,7 +703,7 @@ class CakeSchemaTest extends CakeTestCase { ); $result = $this->Schema->generateTable('fields', $posts); $this->assertRegExp('/public \$fields/', $result); - $this->assertPattern('/\'type\' \=\> \'fulltext\'/', $result); + $this->assertRegExp('/\'type\' \=\> \'fulltext\'/', $result); } /** diff --git a/lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php b/lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php index bc06c1e65..4081d5ee2 100644 --- a/lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php +++ b/lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php @@ -147,7 +147,7 @@ class ModelCrossSchemaHabtmTest extends BaseModelTest { )); $results = $Player->saveAll($player, array('validate' => 'first')); - $this->assertNotEqual(false, $results); + $this->assertNotSame(false, $results); $count = $Player->find('count'); $this->assertEquals(5, $count); diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 97dd8a0ae..a87ed117f 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -9312,7 +9312,7 @@ class FormHelperTest extends CakeTestCase { 'div' => false, 'label' => false, ); - $this->assertEqual($result, $expected); + $this->assertEquals($expected, $result); } } diff --git a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php index 5e63a3fe5..d8f289d1f 100644 --- a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php @@ -2233,7 +2233,7 @@ class PaginatorHelperTest extends CakeTestCase { */ public function testParam() { $result = $this->Paginator->param('count'); - $this->assertIdentical(62, $result); + $this->assertSame(62, $result); $result = $this->Paginator->param('imaginary'); $this->assertNull($result); diff --git a/lib/Cake/Test/Case/View/ViewTest.php b/lib/Cake/Test/Case/View/ViewTest.php index 45fff9196..337591e7e 100644 --- a/lib/Cake/Test/Case/View/ViewTest.php +++ b/lib/Cake/Test/Case/View/ViewTest.php @@ -1388,7 +1388,7 @@ class ViewTest extends CakeTestCase { public function testBlockSetDecimal() { $this->View->assign('testWithDecimal', 1.23456789); $result = $this->View->fetch('testWithDecimal'); - $this->assertEqual('1.23456789', $result); + $this->assertEquals('1.23456789', $result); } /** diff --git a/lib/Cake/Test/Fixture/AssertTagsTestCase.php b/lib/Cake/Test/Fixture/AssertTagsTestCase.php index 42bebde9a..9391dd426 100644 --- a/lib/Cake/Test/Fixture/AssertTagsTestCase.php +++ b/lib/Cake/Test/Fixture/AssertTagsTestCase.php @@ -1,6 +1,6 @@ Date: Wed, 25 Sep 2013 22:07:52 +0200 Subject: [PATCH 2/2] correct order of params --- lib/Cake/Test/Case/View/Helper/FormHelperTest.php | 6 +++--- lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index a87ed117f..0959c9ce6 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -6754,7 +6754,7 @@ class FormHelperTest extends CakeTestCase { $result = $matches[1]; $expected = range(date('Y') + 20, 1930); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $this->Form->request->data['Project']['release'] = '2050-10-10'; $result = $this->Form->year('Project.release'); @@ -6762,7 +6762,7 @@ class FormHelperTest extends CakeTestCase { $result = $matches[1]; $expected = range(2050, date('Y') - 20); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $this->Form->request->data['Project']['release'] = '1881-10-10'; $result = $this->Form->year('Project.release', 1890, 1900); @@ -6770,7 +6770,7 @@ class FormHelperTest extends CakeTestCase { $result = $matches[1]; $expected = range(1900, 1881); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index 9b4ceb70c..d0957653f 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -1844,13 +1844,13 @@ class HtmlHelperTest extends CakeTestCase { $this->assertTags($result, array('div' => array('class' => 'class-name'), '<text>', '/div')); $result = $this->Html->tag(false, 'stuff'); - $this->assertEquals($result, 'stuff'); + $this->assertEquals('stuff', $result); $result = $this->Html->tag(null, 'stuff'); - $this->assertEquals($result, 'stuff'); + $this->assertEquals('stuff', $result); $result = $this->Html->tag('', 'stuff'); - $this->assertEquals($result, 'stuff'); + $this->assertEquals('stuff', $result); } /**