From 0a53242e3ef7f7c9b59bef5ad2575818afb64b86 Mon Sep 17 00:00:00 2001 From: AD7six Date: Tue, 17 May 2011 00:49:00 +0200 Subject: [PATCH] correcting all the inverted assertEqual tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $expected is the first argument. Now certain test results start to make sense: 1) MultibyteTest::testUsingMbStrtolower Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ +ⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥ --- lib/Cake/Test/Case/BasicsTest.php | 108 +- .../Command/Task/ControllerTaskTest.php | 18 +- .../Console/Command/Task/FixtureTaskTest.php | 12 +- .../Console/Command/Task/ModelTaskTest.php | 38 +- .../Console/Command/Task/TemplateTaskTest.php | 2 +- .../Console/Command/Task/TestTaskTest.php | 20 +- .../Test/Case/Console/ConsoleOutputTest.php | 6 +- .../Controller/Component/AclComponentTest.php | 4 +- .../Component/EmailComponentTest.php | 6 +- .../Component/SessionComponentTest.php | 4 +- .../Test/Case/Controller/ControllerTest.php | 12 +- lib/Cake/Test/Case/Core/AppTest.php | 6 +- lib/Cake/Test/Case/Core/ObjectTest.php | 34 +- lib/Cake/Test/Case/I18n/I18nTest.php | 34 +- lib/Cake/Test/Case/I18n/L10nTest.php | 306 +- lib/Cake/Test/Case/I18n/MultibyteTest.php | 3170 ++++++++--------- .../Behavior/ContainableBehaviorTest.php | 96 +- .../Model/Behavior/TranslateBehaviorTest.php | 62 +- .../Model/Behavior/TreeBehaviorAfterTest.php | 2 +- .../Model/Behavior/TreeBehaviorNumberTest.php | 30 +- .../Model/Behavior/TreeBehaviorScopedTest.php | 18 +- .../Model/Behavior/TreeBehaviorUuidTest.php | 2 +- .../Case/Model/BehaviorCollectionTest.php | 20 +- .../Model/Datasource/Database/MssqlTest.php | 42 +- .../Model/Datasource/Database/MysqlTest.php | 310 +- .../Datasource/Database/PostgresTest.php | 16 +- .../Model/Datasource/Database/SqliteTest.php | 16 +- .../Case/Model/Datasource/DboSourceTest.php | 54 +- lib/Cake/Test/Case/Model/DbAclTest.php | 22 +- lib/Cake/Test/Case/Model/ModelDeleteTest.php | 28 +- .../Test/Case/Model/ModelIntegrationTest.php | 46 +- lib/Cake/Test/Case/Model/ModelReadTest.php | 236 +- .../Test/Case/Model/ModelValidationTest.php | 4 +- lib/Cake/Test/Case/Model/ModelWriteTest.php | 114 +- .../Test/Case/Network/CakeResponseTest.php | 10 +- .../Test/Case/Network/Email/CakeEmailTest.php | 20 +- lib/Cake/Test/Case/Routing/DispatcherTest.php | 18 +- .../Test/Case/Routing/Route/CakeRouteTest.php | 18 +- lib/Cake/Test/Case/Routing/RouterTest.php | 368 +- .../Case/TestSuite/ControllerTestCaseTest.php | 2 +- lib/Cake/Test/Case/Utility/DebuggerTest.php | 2 +- lib/Cake/Test/Case/Utility/FolderTest.php | 36 +- lib/Cake/Test/Case/Utility/InflectorTest.php | 34 +- lib/Cake/Test/Case/Utility/SanitizeTest.php | 106 +- lib/Cake/Test/Case/Utility/SetTest.php | 208 +- lib/Cake/Test/Case/Utility/StringTest.php | 74 +- .../Test/Case/View/Helper/FormHelperTest.php | 596 ++-- .../Test/Case/View/Helper/HtmlHelperTest.php | 134 +- .../View/Helper/JqueryEngineHelperTest.php | 64 +- .../Test/Case/View/Helper/JsHelperTest.php | 68 +- .../View/Helper/MootoolsEngineHelperTest.php | 62 +- .../Case/View/Helper/NumberHelperTest.php | 28 +- .../Case/View/Helper/PaginatorHelperTest.php | 428 +-- .../View/Helper/PrototypeEngineHelperTest.php | 70 +- .../Test/Case/View/Helper/RssHelperTest.php | 34 +- .../Case/View/Helper/SessionHelperTest.php | 10 +- .../Test/Case/View/Helper/TextHelperTest.php | 22 +- .../Test/Case/View/Helper/TimeHelperTest.php | 56 +- lib/Cake/Test/Case/View/HelperTest.php | 16 +- 59 files changed, 3691 insertions(+), 3691 deletions(-) diff --git a/lib/Cake/Test/Case/BasicsTest.php b/lib/Cake/Test/Case/BasicsTest.php index 5aef0ed4e..555ed91a3 100644 --- a/lib/Cake/Test/Case/BasicsTest.php +++ b/lib/Cake/Test/Case/BasicsTest.php @@ -59,19 +59,19 @@ class BasicsTest extends CakeTestCase { $two = array('one' => 'one', 'two' => 'two'); $result = array_diff_key($one, $two); $expected = array('three' => 3); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $one = array('one' => array('value', 'value-two'), 'two' => 2, 'three' => 3); $two = array('two' => 'two'); $result = array_diff_key($one, $two); $expected = array('one' => array('value', 'value-two'), 'three' => 3); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $one = array('one' => null, 'two' => 2, 'three' => '', 'four' => 0); $two = array('two' => 'two'); $result = array_diff_key($one, $two); $expected = array('one' => null, 'three' => '', 'four' => 0); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $one = array('minYear' => null, 'maxYear' => null, 'separator' => '-', 'interval' => 1, 'monthNames' => true); $two = array('minYear' => null, 'maxYear' => null, 'separator' => '-', 'interval' => 1, 'monthNames' => true); @@ -244,11 +244,11 @@ class BasicsTest extends CakeTestCase { public function testAm() { $result = am(array('one', 'two'), 2, 3, 4); $expected = array('one', 'two', 2, 3, 4); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = am(array('one' => array(2, 3), 'two' => array('foo')), array('one' => array(4, 5))); $expected = array('one' => array(4, 5),'two' => array('foo')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -360,35 +360,35 @@ class BasicsTest extends CakeTestCase { $result = __('Plural Rule 1'); $expected = 'Plural Rule 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __('Plural Rule 1 (from core)'); $expected = 'Plural Rule 1 (from core translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __('Some string with %s', 'arguments'); $expected = 'Some string with arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __('Some string with %s %s', 'multiple', 'arguments'); $expected = 'Some string with multiple arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __('Some string with %s %s', array('multiple', 'arguments')); $expected = 'Some string with multiple arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __('Testing %2$s %1$s', 'order', 'different'); $expected = 'Testing different order'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __('Testing %2$s %1$s', array('order', 'different')); $expected = 'Testing different order'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __('Testing %.2f number', 1.2345); $expected = 'Testing 1.23 number'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -401,27 +401,27 @@ class BasicsTest extends CakeTestCase { $result = __n('%d = 1', '%d = 0 or > 1', 0); $expected = '%d = 0 or > 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n('%d = 1', '%d = 0 or > 1', 1); $expected = '%d = 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n('%d = 1 (from core)', '%d = 0 or > 1 (from core)', 2); $expected = '%d = 0 or > 1 (from core translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n('%d item.', '%d items.', 1, 1); $expected = '1 item.'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n('%d item for id %s', '%d items for id %s', 2, 2, '1234'); $expected = '2 items for id 1234'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n('%d item for id %s', '%d items for id %s', 2, array(2, '1234')); $expected = '2 items for id 1234'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -434,27 +434,27 @@ class BasicsTest extends CakeTestCase { $result = __d('default', 'Plural Rule 1'); $expected = 'Plural Rule 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __d('core', 'Plural Rule 1'); $expected = 'Plural Rule 1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __d('core', 'Plural Rule 1 (from core)'); $expected = 'Plural Rule 1 (from core translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __d('core', 'Some string with %s', 'arguments'); $expected = 'Some string with arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __d('core', 'Some string with %s %s', 'multiple', 'arguments'); $expected = 'Some string with multiple arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __d('core', 'Some string with %s %s', array('multiple', 'arguments')); $expected = 'Some string with multiple arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -467,31 +467,31 @@ class BasicsTest extends CakeTestCase { $result = __dn('default', '%d = 1', '%d = 0 or > 1', 0); $expected = '%d = 0 or > 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dn('core', '%d = 1', '%d = 0 or > 1', 0); $expected = '%d = 0 or > 1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dn('core', '%d = 1 (from core)', '%d = 0 or > 1 (from core)', 0); $expected = '%d = 0 or > 1 (from core translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dn('default', '%d = 1', '%d = 0 or > 1', 1); $expected = '%d = 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dn('core', '%d item.', '%d items.', 1, 1); $expected = '1 item.'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dn('core', '%d item for id %s', '%d items for id %s', 2, 2, '1234'); $expected = '2 items for id 1234'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dn('core', '%d item for id %s', '%d items for id %s', 2, array(2, '1234')); $expected = '2 items for id 1234'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -504,23 +504,23 @@ class BasicsTest extends CakeTestCase { $result = __c('Plural Rule 1', 6); $expected = 'Plural Rule 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __c('Plural Rule 1 (from core)', 6); $expected = 'Plural Rule 1 (from core translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __c('Some string with %s', 6, 'arguments'); $expected = 'Some string with arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __c('Some string with %s %s', 6, 'multiple', 'arguments'); $expected = 'Some string with multiple arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __c('Some string with %s %s', 6, array('multiple', 'arguments')); $expected = 'Some string with multiple arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -533,31 +533,31 @@ class BasicsTest extends CakeTestCase { $result = __dc('default', 'Plural Rule 1', 6); $expected = 'Plural Rule 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dc('default', 'Plural Rule 1 (from core)', 6); $expected = 'Plural Rule 1 (from core translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dc('core', 'Plural Rule 1', 6); $expected = 'Plural Rule 1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dc('core', 'Plural Rule 1 (from core)', 6); $expected = 'Plural Rule 1 (from core translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dc('core', 'Some string with %s', 6, 'arguments'); $expected = 'Some string with arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dc('core', 'Some string with %s %s', 6, 'multiple', 'arguments'); $expected = 'Some string with multiple arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dc('core', 'Some string with %s %s', 6, array('multiple', 'arguments')); $expected = 'Some string with multiple arguments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -570,27 +570,27 @@ class BasicsTest extends CakeTestCase { $result = __dcn('default', '%d = 1', '%d = 0 or > 1', 0, 6); $expected = '%d = 0 or > 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dcn('default', '%d = 1 (from core)', '%d = 0 or > 1 (from core)', 1, 6); $expected = '%d = 1 (from core translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dcn('core', '%d = 1', '%d = 0 or > 1', 0, 6); $expected = '%d = 0 or > 1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dcn('core', '%d item.', '%d items.', 1, 6, 1); $expected = '1 item.'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dcn('core', '%d item for id %s', '%d items for id %s', 2, 6, 2, '1234'); $expected = '2 items for id 1234'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __dcn('core', '%d item for id %s', '%d items for id %s', 2, 6, array(2, '1234')); $expected = '2 items for id 1234'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -662,11 +662,11 @@ class BasicsTest extends CakeTestCase { public function testConvertSlash() { $result = convertSlash('\path\to\location\\'); $expected = '\path\to\location\\'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = convertSlash('/path/to/location/'); $expected = 'path_to_location'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -710,13 +710,13 @@ class BasicsTest extends CakeTestCase { pr('this is a test'); $result = ob_get_clean(); $expected = "
this is a test
"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); ob_start(); pr(array('this' => 'is', 'a' => 'test')); $result = ob_get_clean(); $expected = "
Array\n(\n    [this] => is\n    [a] => test\n)\n
"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php index 04a3e9fd3..8ae23387b 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php @@ -117,13 +117,13 @@ class ControllerTaskTest extends CakeTestCase { $expected = array('BakeArticles', 'BakeArticlesBakeTags', 'BakeComments', 'BakeTags'); $result = $this->Task->listAll('test'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Task->interactive = false; $result = $this->Task->listAll(); $expected = array('bake_articles', 'bake_articles_bake_tags', 'bake_comments', 'bake_tags'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -143,11 +143,11 @@ class ControllerTaskTest extends CakeTestCase { $result = $this->Task->getName('test'); $expected = 'BakeComments'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Task->getName('test'); $expected = 'BakeArticles'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -187,7 +187,7 @@ class ControllerTaskTest extends CakeTestCase { $this->Task->expects($this->at(1))->method('in')->will($this->returnValue(' Javascript, Ajax, CustomOne ')); $result = $this->Task->doHelpers(); $expected = array('Javascript', 'Ajax', 'CustomOne'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -200,7 +200,7 @@ class ControllerTaskTest extends CakeTestCase { $this->Task->expects($this->at(1))->method('in')->will($this->returnValue(' Javascript, Ajax, CustomOne, , ')); $result = $this->Task->doHelpers(); $expected = array('Javascript', 'Ajax', 'CustomOne'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -225,7 +225,7 @@ class ControllerTaskTest extends CakeTestCase { $result = $this->Task->doComponents(); $expected = array('RequestHandler', 'Security'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -239,7 +239,7 @@ class ControllerTaskTest extends CakeTestCase { $result = $this->Task->doComponents(); $expected = array('RequestHandler', 'Security'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -644,4 +644,4 @@ class ControllerTaskTest extends CakeTestCase { ); $this->Task->execute(); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php index 8ba349692..7baf6bc88 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php @@ -50,7 +50,7 @@ class FixtureTaskTest extends CakeTestCase { $out = $this->getMock('ConsoleOutput', array(), array(), '', false); $in = $this->getMock('ConsoleInput', array(), array(), '', false); - $this->Task = $this->getMock('FixtureTask', + $this->Task = $this->getMock('FixtureTask', array('in', 'err', 'createFile', '_stop', 'clear'), array($out, $out, $in) ); @@ -97,7 +97,7 @@ class FixtureTaskTest extends CakeTestCase { $result = $this->Task->importOptions('Article'); $expected = array('schema' => 'Article', 'records' => true); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -112,9 +112,9 @@ class FixtureTaskTest extends CakeTestCase { $result = $this->Task->importOptions('Article'); $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } - + /** * test importOptions choosing from Table. * @@ -126,7 +126,7 @@ class FixtureTaskTest extends CakeTestCase { $this->Task->expects($this->at(2))->method('in')->will($this->returnValue('y')); $result = $this->Task->importOptions('Article'); $expected = array('fromTable' => true); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -178,7 +178,7 @@ class FixtureTaskTest extends CakeTestCase { $this->Task->expects($this->at(0))->method('createFile') ->with($filename, new PHPUnit_Framework_Constraint_PCREMatch('/class ArticleFixture/')); - + $this->Task->execute(); } diff --git a/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php index 661cf7921..4603dfb35 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php @@ -131,12 +131,12 @@ class ModelTaskTest extends CakeTestCase { $result = $this->Task->listAll('test'); $expected = array('bake_articles', 'bake_articles_bake_tags', 'bake_comments', 'bake_tags', 'category_threads'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Task->connection = 'test'; $result = $this->Task->listAll(); $expected = array('bake_articles', 'bake_articles_bake_tags', 'bake_comments', 'bake_tags', 'category_threads'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -187,7 +187,7 @@ class ModelTaskTest extends CakeTestCase { $this->Task->expects($this->at(0))->method('in')->will($this->returnValue('y')); $result = $this->Task->getTable('BakeArticle', 'test'); $expected = 'bake_articles'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -199,7 +199,7 @@ class ModelTaskTest extends CakeTestCase { $this->Task->expects($this->any())->method('in')->will($this->onConsecutiveCalls('n', 'my_table')); $result = $this->Task->getTable('BakeArticle', 'test'); $expected = 'my_table'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -254,7 +254,7 @@ class ModelTaskTest extends CakeTestCase { $result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false)); $expected = array('notempty' => 'notempty', 'maxlength' => 'maxlength'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -275,7 +275,7 @@ class ModelTaskTest extends CakeTestCase { $result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false)); $expected = array('notempty' => 'notempty'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -291,7 +291,7 @@ class ModelTaskTest extends CakeTestCase { $result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false)); $expected = array('a_z_0_9' => '/^[a-z]{0,9}$/'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -352,7 +352,7 @@ class ModelTaskTest extends CakeTestCase { 'time' => 'time' ), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -370,10 +370,10 @@ class ModelTaskTest extends CakeTestCase { $this->Task->expects($this->once())->method('in') ->with($anything, null, 'key') ->will($this->returnValue('my_field')); - + $result = $this->Task->findPrimaryKey($fields); $expected = 'my_field'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -430,7 +430,7 @@ class ModelTaskTest extends CakeTestCase { ), ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $model = new Model(array('ds' => 'test', 'name' => 'CategoryThread')); $result = $this->Task->findBelongsTo($model, array()); @@ -443,7 +443,7 @@ class ModelTaskTest extends CakeTestCase { ), ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -472,7 +472,7 @@ class ModelTaskTest extends CakeTestCase { ), ), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $model = new Model(array('ds' => 'test', 'name' => 'CategoryThread')); $result = $this->Task->findHasOneAndMany($model, array()); @@ -492,7 +492,7 @@ class ModelTaskTest extends CakeTestCase { ), ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -516,7 +516,7 @@ class ModelTaskTest extends CakeTestCase { ), ), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -750,7 +750,7 @@ STRINGEND; $path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Model' . DS . 'BakeArticle.php'; $this->Task->expects($this->once())->method('createFile') ->with($path, new PHPUnit_Framework_Constraint_PCREMatch('/BakeArticle extends ControllerTestAppModel/')); - + $this->Task->bake('BakeArticle', array(), array()); $this->assertEqual(count(ClassRegistry::keys()), 0); @@ -767,7 +767,7 @@ STRINGEND; $this->Task->path = '/my/path/'; $this->Task->args = array('BakeArticle'); $filename = '/my/path/BakeArticle.php'; - + $this->Task->expects($this->once())->method('_checkUnitTest')->will($this->returnValue(1)); $this->Task->expects($this->once())->method('createFile') ->with($filename, new PHPUnit_Framework_Constraint_PCREMatch('/class BakeArticle extends AppModel/')); @@ -818,7 +818,7 @@ STRINGEND; $this->Task->path = '/my/path/'; $this->Task->args = array('BakeArticle'); $filename = '/my/path/BakeArticle.php'; - + $this->Task->expects($this->once())->method('_checkUnitTest')->will($this->returnValue(1)); $this->Task->expects($this->at(0))->method('createFile') ->with($filename, new PHPUnit_Framework_Constraint_PCREMatch("/'BakeComment' \=\> array\(/")); @@ -860,7 +860,7 @@ STRINGEND; $filename = '/my/path/BakeTag.php'; $this->Task->expects($this->at(4)) ->method('createFile')->with($filename, new PHPUnit_Framework_Constraint_PCREMatch('/class BakeTag/')); - + $filename = '/my/path/CategoryThread.php'; $this->Task->expects($this->at(5))->method('createFile') ->with($filename, new PHPUnit_Framework_Constraint_PCREMatch('/class CategoryThread/')); diff --git a/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php index e214b41a1..d33542f8b 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php @@ -134,7 +134,7 @@ class TemplateTaskTest extends CakeTestCase { $result = $this->Task->generate('classes', 'test_object', array('test' => 'foo')); $expected = "I got rendered\nfoo"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php index 534d898ee..da582923d 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php @@ -401,7 +401,7 @@ class TestTaskTest extends CakeTestCase { $result = $this->Task->getUserFixtures(); $expected = array('app.pizza', 'app.topping', 'app.side_dish'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -497,15 +497,15 @@ class TestTaskTest extends CakeTestCase { public function testGenerateConstructor() { $result = $this->Task->generateConstructor('controller', 'PostsController'); $expected = "new TestPostsController();\n\t\t\$this->Posts->constructClasses();\n"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Task->generateConstructor('model', 'Post'); $expected = "ClassRegistry::init('Post');\n"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Task->generateConstructor('helper', 'FormHelper'); $expected = "new FormHelper();\n"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -578,29 +578,29 @@ class TestTaskTest extends CakeTestCase { $result = $this->Task->testCaseFileName('Model', 'Post'); $expected = $this->Task->path . 'Case' . DS . 'Model' . DS . 'PostTest.php'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Task->testCaseFileName('Helper', 'Form'); $expected = $this->Task->path . 'Case' . DS . 'View' . DS . 'Helper' . DS . 'FormHelperTest.php'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Task->testCaseFileName('Controller', 'Posts'); $expected = $this->Task->path . 'Case' . DS . 'Controller' . DS . 'PostsControllerTest.php'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Task->testCaseFileName('Behavior', 'Containable'); $expected = $this->Task->path . 'Case' . DS . 'Model' . DS . 'Behavior' . DS . 'ContainableBehaviorTest.php'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Task->testCaseFileName('Component', 'Auth'); $expected = $this->Task->path . 'Case' . DS . 'Controller' . DS . 'Component' . DS . 'AuthComponentTest.php'; - $this->assertEqual($result, $expected); + $this->assertEqual($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 . 'tests' . DS . 'Case' . DS . 'Model' . DS . 'PostTest.php'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Console/ConsoleOutputTest.php b/lib/Cake/Test/Case/Console/ConsoleOutputTest.php index 1063a2640..2f6e60852 100644 --- a/lib/Cake/Test/Case/Console/ConsoleOutputTest.php +++ b/lib/Cake/Test/Case/Console/ConsoleOutputTest.php @@ -97,7 +97,7 @@ class ConsoleOutputTest extends CakeTestCase { function testStylesGet() { $result = $this->output->styles('error'); $expected = array('text' => 'red', 'underline' => true); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertNull($this->output->styles('made_up_goop')); @@ -116,7 +116,7 @@ class ConsoleOutputTest extends CakeTestCase { $result = $this->output->styles('test'); $expected = array('text' => 'red', 'background' => 'black'); $this->assertEquals($expected, $result); - + $this->assertTrue($this->output->styles('test', false), 'Removing a style should return true.'); $this->assertNull($this->output->styles('test'), 'Removed styles should be null.'); } @@ -225,4 +225,4 @@ class ConsoleOutputTest extends CakeTestCase { $this->output->write('Bad Regular', false); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php index 43098a3f4..67beef88c 100644 --- a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php @@ -549,7 +549,7 @@ class DbAclTest extends CakeTestCase { array('AroTwoTest' => array('id' => '4', 'parent_id' => '1', 'model' => 'Group', 'foreign_key' => 3, 'alias' => 'users')), array('AroTwoTest' => array('id' => '1', 'parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'root')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Acl->Aco->node('ROOT/tpsReports/view/current'); $expected = array( @@ -558,7 +558,7 @@ class DbAclTest extends CakeTestCase { array('AcoTwoTest' => array('id' => '2', 'parent_id' => '1', 'model' => null, 'foreign_key' => null, 'alias' => 'tpsReports')), array('AcoTwoTest' => array('id' => '1', 'parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT')), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php index 24711f0cb..d74f835f3 100644 --- a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php @@ -582,18 +582,18 @@ HTMLBLOC; $result = $this->Controller->EmailTest->strip($content, true); $expected = "Previous content\n--alt-\n text/html; utf-8\n 7bit\n\n

My own html content

"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $content = '

Some HTML content with an email link'; $result = $this->Controller->EmailTest->strip($content, true); $expected = $content; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $content = '

Some HTML content with an '; $content .= 'email link'; $result = $this->Controller->EmailTest->strip($content, true); $expected = $content; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php b/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php index d0af41057..b59aac342 100644 --- a/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php @@ -147,10 +147,10 @@ class SessionComponentTest extends CakeTestCase { $expected = $Session->id(); $result = $Object->requestAction('/session_test/session_id'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Object->requestAction('/orange_session_test/session_id'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Controller/ControllerTest.php b/lib/Cake/Test/Case/Controller/ControllerTest.php index 7b00b5c13..416a575d5 100644 --- a/lib/Cake/Test/Case/Controller/ControllerTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerTest.php @@ -569,7 +569,7 @@ class ControllerTest extends CakeTestCase { '; $result = str_replace(array("\t", "\r\n", "\n"), "", $result); $expected = str_replace(array("\t", "\r\n", "\n"), "", $expected); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); App::build(array( 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) @@ -1035,7 +1035,7 @@ class ControllerTest extends CakeTestCase { $comment->set('someVar', 'data'); $result = $TestController->validateErrors($comment); $expected = array('some_field' => array('error_message'), 'some_field2' => array('error_message2')); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $this->assertEqual($TestController->validate($comment), 2); } @@ -1053,7 +1053,7 @@ class ControllerTest extends CakeTestCase { $result = $TestController->validateErrors($Post); $expected = array('title' => array('This field cannot be left blank')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1078,7 +1078,7 @@ class ControllerTest extends CakeTestCase { 'Model3.field3' => '23', ); $result = $Controller->postConditions($data); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $data = array(); @@ -1093,7 +1093,7 @@ class ControllerTest extends CakeTestCase { 'Model3.field3' => '23', ); $result = $Controller->postConditions($data); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $data = array(); @@ -1119,7 +1119,7 @@ class ControllerTest extends CakeTestCase { 'Model3.field3 <=' => '23', ); $result = $Controller->postConditions($data, $ops); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Core/AppTest.php b/lib/Cake/Test/Case/Core/AppTest.php index 1ca7c6324..e4b52a487 100644 --- a/lib/Cake/Test/Case/Core/AppTest.php +++ b/lib/Cake/Test/Case/Core/AppTest.php @@ -293,7 +293,7 @@ class AppImportTest extends CakeTestCase { $result = App::objects('file', 'non_existing_configure'); $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = App::objects('NonExistingType'); $this->assertEqual($result, array()); @@ -335,11 +335,11 @@ class AppImportTest extends CakeTestCase { $result = App::objects('TestPlugin.helper'); sort($result); $expected = array('OtherHelperHelper', 'PluggedHelperHelper', 'TestPluginAppHelper'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = App::objects('TestPlugin.View/Helper'); sort($result); $expected = array('OtherHelperHelper', 'PluggedHelperHelper', 'TestPluginAppHelper'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = App::objects('TestPlugin.component'); $this->assertTrue(in_array('OtherComponent', $result)); diff --git a/lib/Cake/Test/Case/Core/ObjectTest.php b/lib/Cake/Test/Case/Core/ObjectTest.php index ace5a1250..65c98192d 100644 --- a/lib/Cake/Test/Case/Core/ObjectTest.php +++ b/lib/Cake/Test/Case/Core/ObjectTest.php @@ -447,7 +447,7 @@ class ObjectTest extends CakeTestCase { $this->object->testPersist('ObjectTestModel', true, $model, 'registry'); $result = ClassRegistry::keys(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $newModel = ClassRegistry::getObject('object_test_model'); $this->assertEqual('ObjectTestModel', $newModel->name); @@ -575,7 +575,7 @@ class ObjectTest extends CakeTestCase { )); $result = $this->object->requestAction('/request_action_persistent/index'); $expected = 'This is a test'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); @unlink(CACHE . 'persistent' . DS . 'persisterone.php'); @unlink(CACHE . 'persistent' . DS . 'persisteroneregistry.php'); @@ -685,26 +685,26 @@ class ObjectTest extends CakeTestCase { $result = $this->object->requestAction('/request_action/test_request_action'); $expected = 'This is a test'; - $this->assertEqual($result, $expected);; + $this->assertEqual($expected, $result);; $result = $this->object->requestAction('/request_action/another_ra_test/2/5'); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction('/tests_apps/index', array('return')); $expected = 'This is the TestsAppsController index view'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction('/tests_apps/some_method'); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction('/request_action/paginate_request_action'); $this->assertTrue($result); $result = $this->object->requestAction('/request_action/normal_request_action'); $expected = 'Hello World'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); App::build(); } @@ -723,27 +723,27 @@ class ObjectTest extends CakeTestCase { $result = $this->object->requestAction('/test_plugin/tests/index', array('return')); $expected = 'test plugin index'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction('/test_plugin/tests/index/some_param', array('return')); $expected = 'test plugin index'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction( array('controller' => 'tests', 'action' => 'index', 'plugin' => 'test_plugin'), array('return') ); $expected = 'test plugin index'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction('/test_plugin/tests/some_method'); $expected = 25; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction( array('controller' => 'tests', 'action' => 'some_method', 'plugin' => 'test_plugin') ); $expected = 25; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); App::build(); CakePlugin::unload(); @@ -767,30 +767,30 @@ class ObjectTest extends CakeTestCase { array('controller' => 'request_action', 'action' => 'test_request_action') ); $expected = 'This is a test'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction( array('controller' => 'request_action', 'action' => 'another_ra_test'), array('pass' => array('5', '7')) ); $expected = 12; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction( array('controller' => 'tests_apps', 'action' => 'index'), array('return') ); $expected = 'This is the TestsAppsController index view'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction(array('controller' => 'tests_apps', 'action' => 'some_method')); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction( array('controller' => 'request_action', 'action' => 'normal_request_action') ); $expected = 'Hello World'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->object->requestAction( array('controller' => 'request_action', 'action' => 'paginate_request_action') diff --git a/lib/Cake/Test/Case/I18n/I18nTest.php b/lib/Cake/Test/Case/I18n/I18nTest.php index f5024fd62..5ef8ee6a1 100644 --- a/lib/Cake/Test/Case/I18n/I18nTest.php +++ b/lib/Cake/Test/Case/I18n/I18nTest.php @@ -2487,7 +2487,7 @@ class I18nTest extends CakeTestCase { $expected .= "broken up over multiple lines.\n"; $expected .= "This is the third line.\n"; $expected .= "This is the forth line. (translated)"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // Windows Newline is \r\n $string = "This is a multiline translation\r\n"; @@ -2495,18 +2495,18 @@ class I18nTest extends CakeTestCase { $string .= "This is the third line.\r\n"; $string .= "This is the forth line."; $result = __($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $singular = "valid\nsecond line"; $plural = "valids\nsecond line"; $result = __n($singular, $plural, 1); $expected = "v\nsecond line"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n($singular, $plural, 2); $expected = "vs\nsecond line"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = "This is a multiline translation\n"; $string .= "broken up over multiple lines.\n"; @@ -2518,11 +2518,11 @@ class I18nTest extends CakeTestCase { $result = __n($singular, $plural, 1); $expected = "%d is 1\n" . $string; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n($singular, $plural, 2); $expected = "%d is 2-4\n" . $string; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // Windows Newline is \r\n $string = "This is a multiline translation\r\n"; @@ -2535,11 +2535,11 @@ class I18nTest extends CakeTestCase { $result = __n($singular, $plural, 1); $expected = "%d is 1\n" . str_replace("\r\n", "\n", $string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n($singular, $plural, 2); $expected = "%d is 2-4\n" . str_replace("\r\n", "\n", $string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2576,15 +2576,15 @@ class I18nTest extends CakeTestCase { $result = __n('%d = 1', '%d = 0 or > 1', (float)1); $expected = '%d is 1 (translated)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n('%d = 1', '%d = 0 or > 1', (float)2); $expected = "%d ends in 2-4, not 12-14 (translated)"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __n('%d = 1', '%d = 0 or > 1', (float)5); $expected = "%d everything else (translated)"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2635,15 +2635,15 @@ class I18nTest extends CakeTestCase { Configure::write('Config.language', 'po'); $result = __c('d_fmt', 5); $expected = '%m/%d/%Y'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __c('am_pm', 5); $expected = array('AM', 'PM'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __c('abmon', 5); $expected = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } function testTimeDefinitionJapanese(){ @@ -2652,15 +2652,15 @@ class I18nTest extends CakeTestCase { $expected = "%Y年%m月%d日"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __c('am_pm', 5); $expected = array("午前", "午後"); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = __c('abmon', 5); $expected = array(" 1月", " 2月", " 3月", " 4月", " 5月", " 6月", " 7月", " 8月", " 9月", "10月", "11月", "12月"); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/I18n/L10nTest.php b/lib/Cake/Test/Case/I18n/L10nTest.php index 85a01f64a..5a20240f9 100644 --- a/lib/Cake/Test/Case/I18n/L10nTest.php +++ b/lib/Cake/Test/Case/I18n/L10nTest.php @@ -123,323 +123,323 @@ class L10nTest extends CakeTestCase { $result = $l10n->map(array('afr', 'af')); $expected = array('afr' => 'af', 'af' => 'afr'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('alb', 'sq')); $expected = array('alb' => 'sq', 'sq' => 'alb'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ara', 'ar')); $expected = array('ara' => 'ar', 'ar' => 'ara'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('hye', 'hy')); $expected = array('hye' => 'hy', 'hy' => 'hye'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('baq', 'eu')); $expected = array('baq' => 'eu', 'eu' => 'baq'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('baq', 'eu')); $expected = array('baq' => 'eu', 'eu' => 'baq'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('bos', 'bs')); $expected = array('bos' => 'bs', 'bs' => 'bos'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('bul', 'bg')); $expected = array('bul' => 'bg', 'bg' => 'bul'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('bel', 'be')); $expected = array('bel' => 'be', 'be' => 'bel'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('cat', 'ca')); $expected = array('cat' => 'ca', 'ca' => 'cat'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('chi', 'zh')); $expected = array('chi' => 'zh', 'zh' => 'chi'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('zho', 'zh')); $expected = array('zho' => 'zh', 'zh' => 'chi'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('hrv', 'hr')); $expected = array('hrv' => 'hr', 'hr' => 'hrv'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ces', 'cs')); $expected = array('ces' => 'cs', 'cs' => 'cze'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('cze', 'cs')); $expected = array('cze' => 'cs', 'cs' => 'cze'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('dan', 'da')); $expected = array('dan' => 'da', 'da' => 'dan'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('dut', 'nl')); $expected = array('dut' => 'nl', 'nl' => 'dut'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('nld', 'nl')); $expected = array('nld' => 'nl', 'nl' => 'dut'); - $this->assertEqual($result, $expected); - + $this->assertEqual($expected, $result); + $result = $l10n->map(array('nld')); $expected = array('nld' => 'nl'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('eng', 'en')); $expected = array('eng' => 'en', 'en' => 'eng'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('est', 'et')); $expected = array('est' => 'et', 'et' => 'est'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('fao', 'fo')); $expected = array('fao' => 'fo', 'fo' => 'fao'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('fas', 'fa')); $expected = array('fas' => 'fa', 'fa' => 'fas'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('per', 'fa')); $expected = array('per' => 'fa', 'fa' => 'fas'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('fin', 'fi')); $expected = array('fin' => 'fi', 'fi' => 'fin'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('fra', 'fr')); $expected = array('fra' => 'fr', 'fr' => 'fre'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('fre', 'fr')); $expected = array('fre' => 'fr', 'fr' => 'fre'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('gla', 'gd')); $expected = array('gla' => 'gd', 'gd' => 'gla'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('glg', 'gl')); $expected = array('glg' => 'gl', 'gl' => 'glg'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('deu', 'de')); $expected = array('deu' => 'de', 'de' => 'deu'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ger', 'de')); $expected = array('ger' => 'de', 'de' => 'deu'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ell', 'el')); $expected = array('ell' => 'el', 'el' => 'gre'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('gre', 'el')); $expected = array('gre' => 'el', 'el' => 'gre'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('heb', 'he')); $expected = array('heb' => 'he', 'he' => 'heb'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('hin', 'hi')); $expected = array('hin' => 'hi', 'hi' => 'hin'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('hun', 'hu')); $expected = array('hun' => 'hu', 'hu' => 'hun'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ice', 'is')); $expected = array('ice' => 'is', 'is' => 'ice'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('isl', 'is')); $expected = array('isl' => 'is', 'is' => 'ice'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ind', 'id')); $expected = array('ind' => 'id', 'id' => 'ind'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('gle', 'ga')); $expected = array('gle' => 'ga', 'ga' => 'gle'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ita', 'it')); $expected = array('ita' => 'it', 'it' => 'ita'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('jpn', 'ja')); $expected = array('jpn' => 'ja', 'ja' => 'jpn'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('kor', 'ko')); $expected = array('kor' => 'ko', 'ko' => 'kor'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('lav', 'lv')); $expected = array('lav' => 'lv', 'lv' => 'lav'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('lit', 'lt')); $expected = array('lit' => 'lt', 'lt' => 'lit'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('mac', 'mk')); $expected = array('mac' => 'mk', 'mk' => 'mac'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('mkd', 'mk')); $expected = array('mkd' => 'mk', 'mk' => 'mac'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('may', 'ms')); $expected = array('may' => 'ms', 'ms' => 'may'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('msa', 'ms')); $expected = array('msa' => 'ms', 'ms' => 'may'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('mlt', 'mt')); $expected = array('mlt' => 'mt', 'mt' => 'mlt'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('nor', 'no')); $expected = array('nor' => 'no', 'no' => 'nor'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('nob', 'nb')); $expected = array('nob' => 'nb', 'nb' => 'nob'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('nno', 'nn')); $expected = array('nno' => 'nn', 'nn' => 'nno'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('pol', 'pl')); $expected = array('pol' => 'pl', 'pl' => 'pol'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('por', 'pt')); $expected = array('por' => 'pt', 'pt' => 'por'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('roh', 'rm')); $expected = array('roh' => 'rm', 'rm' => 'roh'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ron', 'ro')); $expected = array('ron' => 'ro', 'ro' => 'rum'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('rum', 'ro')); $expected = array('rum' => 'ro', 'ro' => 'rum'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('rus', 'ru')); $expected = array('rus' => 'ru', 'ru' => 'rus'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('smi', 'sz')); $expected = array('smi' => 'sz', 'sz' => 'smi'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('scc', 'sr')); $expected = array('scc' => 'sr', 'sr' => 'scc'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('srp', 'sr')); $expected = array('srp' => 'sr', 'sr' => 'scc'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('slk', 'sk')); $expected = array('slk' => 'sk', 'sk' => 'slo'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('slo', 'sk')); $expected = array('slo' => 'sk', 'sk' => 'slo'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('slv', 'sl')); $expected = array('slv' => 'sl', 'sl' => 'slv'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('wen', 'sb')); $expected = array('wen' => 'sb', 'sb' => 'wen'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('spa', 'es')); $expected = array('spa' => 'es', 'es' => 'spa'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('swe', 'sv')); $expected = array('swe' => 'sv', 'sv' => 'swe'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('tha', 'th')); $expected = array('tha' => 'th', 'th' => 'tha'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('tso', 'ts')); $expected = array('tso' => 'ts', 'ts' => 'tso'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('tsn', 'tn')); $expected = array('tsn' => 'tn', 'tn' => 'tsn'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('tur', 'tr')); $expected = array('tur' => 'tr', 'tr' => 'tur'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ukr', 'uk')); $expected = array('ukr' => 'uk', 'uk' => 'ukr'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('urd', 'ur')); $expected = array('urd' => 'ur', 'ur' => 'urd'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('ven', 've')); $expected = array('ven' => 've', 've' => 'ven'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('vie', 'vi')); $expected = array('vie' => 'vi', 'vi' => 'vie'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('xho', 'xh')); $expected = array('xho' => 'xh', 'xh' => 'xho'); - $this->assertEqual($result, $expected); - + $this->assertEqual($expected, $result); + $result = $l10n->map(array('cy', 'cym')); $expected = array('cym' => 'cy', 'cy' => 'cym'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('yid', 'yi')); $expected = array('yid' => 'yi', 'yi' => 'yid'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->map(array('zul', 'zu')); $expected = array('zul' => 'zu', 'zu' => 'zul'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -455,7 +455,7 @@ class L10nTest extends CakeTestCase { $expected = array( 'af' => array('language' => 'Afrikaans', 'locale' => 'afr', 'localeFallback' => 'afr', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ar', 'ar-ae', 'ar-bh', 'ar-dz', 'ar-eg', 'ar-iq', 'ar-jo', 'ar-kw', 'ar-lb', 'ar-ly', 'ar-ma', 'ar-om', 'ar-qa', 'ar-sa', 'ar-sy', 'ar-tn', 'ar-ye')); @@ -478,43 +478,43 @@ class L10nTest extends CakeTestCase { 'ar-tn' => array('language' => 'Arabic (Tunisia)', 'locale' => 'ar_tn', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-ye' => array('language' => 'Arabic (Yemen)', 'locale' => 'ar_ye', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('be')); $expected = array( 'be' => array('language' => 'Byelorussian', 'locale' => 'bel', 'localeFallback' => 'bel', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('bg')); $expected = array( 'bg' => array('language' => 'Bulgarian', 'locale' => 'bul', 'localeFallback' => 'bul', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('bs')); $expected = array( 'bs' => array('language' => 'Bosnian', 'locale' => 'bos', 'localeFallback' => 'bos', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ca')); $expected = array( 'ca' => array('language' => 'Catalan', 'locale' => 'cat', 'localeFallback' => 'cat', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('cs')); $expected = array( 'cs' => array('language' => 'Czech', 'locale' => 'cze', 'localeFallback' => 'cze', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('da')); $expected = array( 'da' => array('language' => 'Danish', 'locale' => 'dan', 'localeFallback' => 'dan', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('de', 'de-at', 'de-ch', 'de-de', 'de-li', 'de-lu')); $expected = array( @@ -525,14 +525,14 @@ class L10nTest extends CakeTestCase { 'de-li' => array('language' => 'German (Liechtenstein)', 'locale' => 'de_li', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), 'de-lu' => array('language' => 'German (Luxembourg)', 'locale' => 'de_lu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('e', 'el')); $expected = array( 'e' => array('language' => 'Greek', 'locale' => 'gre', 'localeFallback' => 'gre', 'charset' => 'utf-8', 'direction' => 'ltr'), 'el' => array('language' => 'Greek', 'locale' => 'gre', 'localeFallback' => 'gre', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('en', 'en-au', 'en-bz', 'en-ca', 'en-gb', 'en-ie', 'en-jm', 'en-nz', 'en-tt', 'en-us', 'en-za')); $expected = array( @@ -548,7 +548,7 @@ class L10nTest extends CakeTestCase { 'en-us' => array('language' => 'English (United States)', 'locale' => 'en_us', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), 'en-za' => array('language' => 'English (South Africa)', 'locale' => 'en_za', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('es', 'es-ar', 'es-bo', 'es-cl', 'es-co', 'es-cr', 'es-do', 'es-ec', 'es-es', 'es-gt', 'es-hn', 'es-mx', 'es-ni', 'es-pa', 'es-pe', 'es-pr', 'es-py', 'es-sv', 'es-uy', 'es-ve')); @@ -574,37 +574,37 @@ class L10nTest extends CakeTestCase { 'es-uy' => array('language' => 'Spanish (Uruguay)', 'locale' => 'es_uy', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), 'es-ve' => array('language' => 'Spanish (Venezuela)', 'locale' => 'es_ve', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('et')); $expected = array( 'et' => array('language' => 'Estonian', 'locale' => 'est', 'localeFallback' => 'est', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('eu')); $expected = array( 'eu' => array('language' => 'Basque', 'locale' => 'baq', 'localeFallback' => 'baq', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('fa')); $expected = array( 'fa' => array('language' => 'Farsi', 'locale' => 'per', 'localeFallback' => 'per', 'charset' => 'utf-8', 'direction' => 'rtl') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('fi')); $expected = array( 'fi' => array('language' => 'Finnish', 'locale' => 'fin', 'localeFallback' => 'fin', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('fo')); $expected = array( 'fo' => array('language' => 'Faeroese', 'locale' => 'fao', 'localeFallback' => 'fao', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('fr', 'fr-be', 'fr-ca', 'fr-ch', 'fr-fr', 'fr-lu')); $expected = array( @@ -615,82 +615,82 @@ class L10nTest extends CakeTestCase { 'fr-fr' => array('language' => 'French (France)', 'locale' => 'fr_fr', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), 'fr-lu' => array('language' => 'French (Luxembourg)', 'locale' => 'fr_lu', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ga')); $expected = array( 'ga' => array('language' => 'Irish', 'locale' => 'gle', 'localeFallback' => 'gle', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('gd', 'gd-ie')); $expected = array( 'gd' => array('language' => 'Gaelic (Scots)', 'locale' => 'gla', 'localeFallback' => 'gla', 'charset' => 'utf-8', 'direction' => 'ltr'), 'gd-ie' => array('language' => 'Gaelic (Irish)', 'locale' => 'gd_ie', 'localeFallback' => 'gla', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('gl')); $expected = array( 'gl' => array('language' => 'Galician', 'locale' => 'glg', 'localeFallback' => 'glg', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('he')); $expected = array( 'he' => array('language' => 'Hebrew', 'locale' => 'heb', 'localeFallback' => 'heb', 'charset' => 'utf-8', 'direction' => 'rtl') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('hi')); $expected = array( 'hi' => array('language' => 'Hindi', 'locale' => 'hin', 'localeFallback' => 'hin', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('hr')); $expected = array( 'hr' => array('language' => 'Croatian', 'locale' => 'hrv', 'localeFallback' => 'hrv', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('hu')); $expected = array( 'hu' => array('language' => 'Hungarian', 'locale' => 'hun', 'localeFallback' => 'hun', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('hy')); $expected = array( 'hy' => array('language' => 'Armenian - Armenia', 'locale' => 'hye', 'localeFallback' => 'hye', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('id', 'in')); $expected = array( 'id' => array('language' => 'Indonesian', 'locale' => 'ind', 'localeFallback' => 'ind', 'charset' => 'utf-8', 'direction' => 'ltr'), 'in' => array('language' => 'Indonesian', 'locale' => 'ind', 'localeFallback' => 'ind', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('is')); $expected = array( 'is' => array('language' => 'Icelandic', 'locale' => 'ice', 'localeFallback' => 'ice', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('it', 'it-ch')); $expected = array( 'it' => array('language' => 'Italian', 'locale' => 'ita', 'localeFallback' => 'ita', 'charset' => 'utf-8', 'direction' => 'ltr'), 'it-ch' => array('language' => 'Italian (Swiss) ', 'locale' => 'it_ch', 'localeFallback' => 'ita', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ja')); $expected = array( 'ja' => array('language' => 'Japanese', 'locale' => 'jpn', 'localeFallback' => 'jpn', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ko', 'ko-kp', 'ko-kr')); $expected = array( @@ -698,7 +698,7 @@ class L10nTest extends CakeTestCase { 'ko-kp' => array('language' => 'Korea (North)', 'locale' => 'ko_kp', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'), 'ko-kr' => array('language' => 'Korea (South)', 'locale' => 'ko_kr', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('koi8-r', 'ru', 'ru-mo')); $expected = array( @@ -706,38 +706,38 @@ class L10nTest extends CakeTestCase { 'ru' => array('language' => 'Russian', 'locale' => 'rus', 'localeFallback' => 'rus', 'charset' => 'utf-8', 'direction' => 'ltr'), 'ru-mo' => array('language' => 'Russian (Moldavia)', 'locale' => 'ru_mo', 'localeFallback' => 'rus', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('lt')); $expected = array( 'lt' => array('language' => 'Lithuanian', 'locale' => 'lit', 'localeFallback' => 'lit', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('lv')); $expected = array( 'lv' => array('language' => 'Latvian', 'locale' => 'lav', 'localeFallback' => 'lav', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('mk', 'mk-mk')); $expected = array( 'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr'), 'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ms')); $expected = array( 'ms' => array('language' => 'Malaysian', 'locale' => 'may', 'localeFallback' => 'may', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('mt')); $expected = array( 'mt' => array('language' => 'Maltese', 'locale' => 'mlt', 'localeFallback' => 'mlt', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('n', 'nl', 'nl-be')); $expected = array( @@ -745,175 +745,175 @@ class L10nTest extends CakeTestCase { 'nl' => array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'), 'nl-be' => array('language' => 'Dutch (Belgium)', 'locale' => 'nl_be', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog('nl'); $expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog('nld'); $expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog('dut'); $expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('nb')); $expected = array( 'nb' => array('language' => 'Norwegian Bokmal', 'locale' => 'nob', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('nn', 'no')); $expected = array( 'nn' => array('language' => 'Norwegian Nynorsk', 'locale' => 'nno', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr'), 'no' => array('language' => 'Norwegian', 'locale' => 'nor', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('p', 'pl')); $expected = array( 'p' => array('language' => 'Polish', 'locale' => 'pol', 'localeFallback' => 'pol', 'charset' => 'utf-8', 'direction' => 'ltr'), 'pl' => array('language' => 'Polish', 'locale' => 'pol', 'localeFallback' => 'pol', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('pt', 'pt-br')); $expected = array( 'pt' => array('language' => 'Portuguese (Portugal)', 'locale' => 'por', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr'), 'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('rm')); $expected = array( 'rm' => array('language' => 'Rhaeto-Romanic', 'locale' => 'roh', 'localeFallback' => 'roh', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ro', 'ro-mo')); $expected = array( 'ro' => array('language' => 'Romanian', 'locale' => 'rum', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr'), 'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('sb')); $expected = array( 'sb' => array('language' => 'Sorbian', 'locale' => 'wen', 'localeFallback' => 'wen', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('sk')); $expected = array( 'sk' => array('language' => 'Slovak', 'locale' => 'slo', 'localeFallback' => 'slo', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('sl')); $expected = array( 'sl' => array('language' => 'Slovenian', 'locale' => 'slv', 'localeFallback' => 'slv', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('sq')); $expected = array( 'sq' => array('language' => 'Albanian', 'locale' => 'alb', 'localeFallback' => 'alb', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('sr')); $expected = array( 'sr' => array('language' => 'Serbian', 'locale' => 'scc', 'localeFallback' => 'scc', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('sv', 'sv-fi')); $expected = array( 'sv' => array('language' => 'Swedish', 'locale' => 'swe', 'localeFallback' => 'swe', 'charset' => 'utf-8', 'direction' => 'ltr'), 'sv-fi' => array('language' => 'Swedish (Finland)', 'locale' => 'sv_fi', 'localeFallback' => 'swe', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('sx')); $expected = array( 'sx' => array('language' => 'Sutu', 'locale' => 'sx', 'localeFallback' => 'sx', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('sz')); $expected = array( 'sz' => array('language' => 'Sami (Lappish)', 'locale' => 'smi', 'localeFallback' => 'smi', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('th')); $expected = array( 'th' => array('language' => 'Thai', 'locale' => 'tha', 'localeFallback' => 'tha', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('tn')); $expected = array( 'tn' => array('language' => 'Tswana', 'locale' => 'tsn', 'localeFallback' => 'tsn', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('tr')); $expected = array( 'tr' => array('language' => 'Turkish', 'locale' => 'tur', 'localeFallback' => 'tur', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ts')); $expected = array( 'ts' => array('language' => 'Tsonga', 'locale' => 'tso', 'localeFallback' => 'tso', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('uk')); $expected = array( 'uk' => array('language' => 'Ukrainian', 'locale' => 'ukr', 'localeFallback' => 'ukr', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ur')); $expected = array( 'ur' => array('language' => 'Urdu', 'locale' => 'urd', 'localeFallback' => 'urd', 'charset' => 'utf-8', 'direction' => 'rtl') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('ve')); $expected = array( 've' => array('language' => 'Venda', 'locale' => 'ven', 'localeFallback' => 'ven', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('vi')); $expected = array( 'vi' => array('language' => 'Vietnamese', 'locale' => 'vie', 'localeFallback' => 'vie', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('cy')); $expected = array( 'cy' => array('language' => 'Welsh', 'locale' => 'cym', 'localeFallback' => 'cym', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('xh')); $expected = array( 'xh' => array('language' => 'Xhosa', 'locale' => 'xho', 'localeFallback' => 'xho', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('yi')); $expected = array( 'yi' => array('language' => 'Yiddish', 'locale' => 'yid', 'localeFallback' => 'yid', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('zh', 'zh-cn', 'zh-hk', 'zh-sg', 'zh-tw')); $expected = array( @@ -923,13 +923,13 @@ class L10nTest extends CakeTestCase { 'zh-sg' => array('language' => 'Chinese (Singapore)', 'locale' => 'zh_sg', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), 'zh-tw' => array('language' => 'Chinese (Taiwan)', 'locale' => 'zh_tw', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('zu')); $expected = array( 'zu' => array('language' => 'Zulu', 'locale' => 'zul', 'localeFallback' => 'zul', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $l10n->catalog(array('en-nz', 'es-do', 'sz', 'ar-lb', 'zh-hk', 'pt-br')); $expected = array( @@ -940,8 +940,8 @@ class L10nTest extends CakeTestCase { 'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), 'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); - + $this->assertEqual($expected, $result); + $result = $l10n->catalog(array('eng', 'deu', 'zho', 'rum', 'zul', 'yid')); $expected = array( 'eng' => array('language' => 'English', 'locale' => 'eng', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), @@ -951,6 +951,6 @@ class L10nTest extends CakeTestCase { 'zul' => array('language' => 'Zulu', 'locale' => 'zul', 'localeFallback' => 'zul', 'charset' => 'utf-8', 'direction' => 'ltr'), 'yid' => array('language' => 'Yiddish', 'locale' => 'yid', 'localeFallback' => 'yid', 'charset' => 'utf-8', 'direction' => 'ltr') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/I18n/MultibyteTest.php b/lib/Cake/Test/Case/I18n/MultibyteTest.php index fab3bb327..b84abf4ac 100644 --- a/lib/Cake/Test/Case/I18n/MultibyteTest.php +++ b/lib/Cake/Test/Case/I18n/MultibyteTest.php @@ -38,13 +38,13 @@ class MultibyteTest extends CakeTestCase { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $result = Multibyte::utf8($string); $expected = array(161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $result = Multibyte::utf8($string); @@ -53,7 +53,7 @@ class MultibyteTest extends CakeTestCase { 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $result = Multibyte::utf8($string); @@ -62,7 +62,7 @@ class MultibyteTest extends CakeTestCase { 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $result = Multibyte::utf8($string); @@ -71,7 +71,7 @@ class MultibyteTest extends CakeTestCase { 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $result = Multibyte::utf8($string); @@ -80,30 +80,30 @@ class MultibyteTest extends CakeTestCase { 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $result = Multibyte::utf8($string); $expected = array(1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $result = Multibyte::utf8($string); $expected = array(1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'չպջռսվտ'; $result = Multibyte::utf8($string); $expected = array(1401, 1402, 1403, 1404, 1405, 1406, 1407); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $result = Multibyte::utf8($string); $expected = array(1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $result = Multibyte::utf8($string); @@ -111,7 +111,7 @@ class MultibyteTest extends CakeTestCase { 10045, 10046, 10047, 10048, 10049, 10050, 10051, 10052, 10053, 10054, 10055, 10056, 10057, 10058, 10059, 10060, 10061, 10062, 10063, 10064, 10065, 10066, 10067, 10068, 10069, 10070, 10071, 10072, 10073, 10074, 10075, 10076, 10077, 10078); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $result = Multibyte::utf8($string); @@ -121,7 +121,7 @@ class MultibyteTest extends CakeTestCase { 11953, 11954, 11955, 11956, 11957, 11958, 11959, 11960, 11961, 11962, 11963, 11964, 11965, 11966, 11967, 11968, 11969, 11970, 11971, 11972, 11973, 11974, 11975, 11976, 11977, 11978, 11979, 11980, 11981, 11982, 11983, 11984, 11985, 11986, 11987, 11988, 11989, 11990, 11991, 11992, 11993, 11994, 11995, 11996, 11997, 11998, 11999, 12000); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $result = Multibyte::utf8($string); @@ -129,7 +129,7 @@ class MultibyteTest extends CakeTestCase { 12117, 12118, 12119, 12120, 12121, 12122, 12123, 12124, 12125, 12126, 12127, 12128, 12129, 12130, 12131, 12132, 12133, 12134, 12135, 12136, 12137, 12138, 12139, 12140, 12141, 12142, 12143, 12144, 12145, 12146, 12147, 12148, 12149, 12150, 12151, 12152, 12153, 12154, 12155, 12156, 12157, 12158, 12159); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $result = Multibyte::utf8($string); @@ -140,7 +140,7 @@ class MultibyteTest extends CakeTestCase { 45665, 45666, 45667, 45668, 45669, 45670, 45671, 45672, 45673, 45674, 45675, 45676, 45677, 45678, 45679, 45680, 45681, 45682, 45683, 45684, 45685, 45686, 45687, 45688, 45689, 45690, 45691, 45692, 45693, 45694, 45695, 45696, 45697, 45698, 45699, 45700); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $result = Multibyte::utf8($string); @@ -149,7 +149,7 @@ class MultibyteTest extends CakeTestCase { 65168, 65169, 65170, 65171, 65172, 65173, 65174, 65175, 65176, 65177, 65178, 65179, 65180, 65181, 65182, 65183, 65184, 65185, 65186, 65187, 65188, 65189, 65190, 65191, 65192, 65193, 65194, 65195, 65196, 65197, 65198, 65199, 65200); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $result = Multibyte::utf8($string); @@ -158,104 +158,104 @@ class MultibyteTest extends CakeTestCase { 65233, 65234, 65235, 65236, 65237, 65238, 65239, 65240, 65241, 65242, 65243, 65244, 65245, 65246, 65247, 65248, 65249, 65250, 65251, 65252, 65253, 65254, 65255, 65256, 65257, 65258, 65259, 65260, 65261, 65262, 65263, 65264, 65265, 65266, 65267, 65268, 65269, 65270, 65271, 65272, 65273, 65274, 65275, 65276); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $result = Multibyte::utf8($string); $expected = array(65345, 65346, 65347, 65348, 65349, 65350, 65351, 65352, 65353, 65354, 65355, 65356, 65357, 65358, 65359, 65360, 65361, 65362, 65363, 65364, 65365, 65366, 65367, 65368, 65369, 65370); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $result = Multibyte::utf8($string); $expected = array(65377, 65378, 65379, 65380, 65381, 65382, 65383, 65384, 65385, 65386, 65387, 65388, 65389, 65390, 65391, 65392, 65393, 65394, 65395, 65396, 65397, 65398, 65399, 65400); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $result = Multibyte::utf8($string); $expected = array(65401, 65402, 65403, 65404, 65405, 65406, 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414, 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422, 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $result = Multibyte::utf8($string); $expected = array(292, 275, 314, 316, 335, 44, 32, 372, 337, 345, 316, 271, 33); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $result = Multibyte::utf8($string); $expected = array(72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¨'; $result = Multibyte::utf8($string); $expected = array(168); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¿'; $result = Multibyte::utf8($string); $expected = array(191); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $result = Multibyte::utf8($string); $expected = array(269, 105, 110, 105); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $result = Multibyte::utf8($string); $expected = array(109, 111, 263, 105); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $result = Multibyte::utf8($string); $expected = array(100, 114, 382, 97, 118, 110, 105); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $result = Multibyte::utf8($string); $expected = array(25226, 30334, 24230, 35774, 20026, 39318, 39029); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = Multibyte::utf8($string); $expected = array(19968, 20108, 19977, 21608, 27704, 40845); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ԀԂԄԆԈԊԌԎԐԒ'; $result = Multibyte::utf8($string); $expected = array(1280, 1282, 1284, 1286, 1288, 1290, 1292, 1294, 1296, 1298); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ԁԃԅԇԉԋԍԏԐԒ'; $result = Multibyte::utf8($string); $expected = array(1281, 1283, 1285, 1287, 1289, 1291, 1293, 1295, 1296, 1298); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; $result = Multibyte::utf8($string); $expected = array(1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1415); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; $result = Multibyte::utf8($string); $expected = array(1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; $result = Multibyte::utf8($string); $expected = array(4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; $result = Multibyte::utf8($string); @@ -266,7 +266,7 @@ class MultibyteTest extends CakeTestCase { 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, 7858, 7860, 7862, 7864, 7866, 7868, 7870, 7872, 7874, 7876, 7878, 7880, 7882, 7884, 7886, 7888, 7890, 7892, 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; $result = Multibyte::utf8($string); @@ -277,39 +277,39 @@ class MultibyteTest extends CakeTestCase { 7825, 7827, 7829, 7830, 7831, 7832, 7833, 7834, 7841, 7843, 7845, 7847, 7849, 7851, 7853, 7855, 7857, 7859, 7861, 7863, 7865, 7867, 7869, 7871, 7873, 7875, 7877, 7879, 7881, 7883, 7885, 7887, 7889, 7891, 7893, 7895, 7897, 7899, 7901, 7903, 7905, 7907, 7909, 7911, 7913, 7915, 7917, 7919, 7921, 7923, 7925, 7927, 7929); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ΩKÅℲ'; $result = Multibyte::utf8($string); $expected = array(8486, 8490, 8491, 8498); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ωkåⅎ'; $result = Multibyte::utf8($string); $expected = array(969, 107, 229, 8526); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; $result = Multibyte::utf8($string); $expected = array(8544, 8545, 8546, 8547, 8548, 8549, 8550, 8551, 8552, 8553, 8554, 8555, 8556, 8557, 8558, 8559, 8579); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; $result = Multibyte::utf8($string); $expected = array(8560, 8561, 8562, 8563, 8564, 8565, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 8573, 8574, 8575, 8580); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; $result = Multibyte::utf8($string); $expected = array(9398, 9399, 9400, 9401, 9402, 9403, 9404, 9405, 9406, 9407, 9408, 9409, 9410, 9411, 9412, 9413, 9414, 9415, 9416, 9417, 9418, 9419, 9420, 9421, 9422, 9423); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; $result = Multibyte::utf8($string); $expected = array(9424, 9425, 9426, 9427, 9428, 9429, 9430, 9431, 9432, 9433, 9434, 9435, 9436, 9437, 9438, 9439, 9440, 9441, 9442, 9443, 9444, 9445, 9446, 9447, 9448, 9449); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; $result = Multibyte::utf8($string); @@ -317,14 +317,14 @@ class MultibyteTest extends CakeTestCase { 11279, 11280, 11281, 11282, 11283, 11284, 11285, 11286, 11287, 11288, 11289, 11290, 11291, 11292, 11293, 11294, 11295, 11296, 11297, 11298, 11299, 11300, 11301, 11302, 11303, 11304, 11305, 11306, 11307, 11308, 11309, 11310); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; $result = Multibyte::utf8($string); $expected = array(11312, 11313, 11314, 11315, 11316, 11317, 11318, 11319, 11320, 11321, 11322, 11323, 11324, 11325, 11326, 11327, 11328, 11329, 11330, 11331, 11332, 11333, 11334, 11335, 11336, 11337, 11338, 11339, 11340, 11341, 11342, 11343, 11344, 11345, 11346, 11347, 11348, 11349, 11350, 11351, 11352, 11353, 11354, 11355, 11356, 11357, 11358); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; $result = Multibyte::utf8($string); @@ -332,7 +332,7 @@ class MultibyteTest extends CakeTestCase { 11422, 11424, 11426, 11428, 11430, 11432, 11434, 11436, 11438, 11440, 11442, 11444, 11446, 11448, 11450, 11452, 11454, 11456, 11458, 11460, 11462, 11464, 11466, 11468, 11470, 11472, 11474, 11476, 11478, 11480, 11482, 11484, 11486, 11488, 11490); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; $result = Multibyte::utf8($string); @@ -340,13 +340,13 @@ class MultibyteTest extends CakeTestCase { 11425, 11427, 11429, 11431, 11433, 11435, 11437, 11439, 11441, 11443, 11445, 11447, 11449, 11451, 11453, 11455, 11457, 11459, 11461, 11463, 11465, 11467, 11469, 11471, 11473, 11475, 11477, 11479, 11481, 11483, 11485, 11487, 11489, 11491); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; $result = Multibyte::utf8($string); $expected = array(64256, 64257, 64258, 64259, 64260, 64261, 64262, 64275, 64276, 64277, 64278, 64279); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -363,14 +363,14 @@ class MultibyteTest extends CakeTestCase { $result = Multibyte::ascii($utf8); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200); $result = Multibyte::ascii($utf8); $expected = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, @@ -379,7 +379,7 @@ class MultibyteTest extends CakeTestCase { 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300); $result = Multibyte::ascii($utf8); $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, @@ -388,7 +388,7 @@ class MultibyteTest extends CakeTestCase { 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400); $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, @@ -397,7 +397,7 @@ class MultibyteTest extends CakeTestCase { 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500); $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, @@ -406,30 +406,30 @@ class MultibyteTest extends CakeTestCase { 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700); $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051); $expected = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100); $expected = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(1401, 1402, 1403, 1404, 1405, 1406, 1407); $expected = 'չպջռսվտ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615); $expected = 'فقكلمنهوىيًٌٍَُ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(10032, 10033, 10034, 10035, 10036, 10037, 10038, 10039, 10040, 10041, 10042, 10043, 10044, 10045, 10046, 10047, 10048, 10049, 10050, 10051, 10052, 10053, 10054, 10055, 10056, 10057, @@ -437,7 +437,7 @@ class MultibyteTest extends CakeTestCase { 10071, 10072, 10073, 10074, 10075, 10076, 10077, 10078); $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(11904, 11905, 11906, 11907, 11908, 11909, 11910, 11911, 11912, 11913, 11914, 11915, 11916, 11917, 11918, 11919, 11920, 11921, 11922, 11923, 11924, 11925, 11926, 11927, 11928, 11929, 11931, 11932, 11933, 11934, 11935, 11936, @@ -447,7 +447,7 @@ class MultibyteTest extends CakeTestCase { 11985, 11986, 11987, 11988, 11989, 11990, 11991, 11992, 11993, 11994, 11995, 11996, 11997, 11998, 11999, 12000); $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(12101, 12102, 12103, 12104, 12105, 12106, 12107, 12108, 12109, 12110, 12111, 12112, 12113, 12114, 12115, 12116, 12117, 12118, 12119, 12120, 12121, 12122, 12123, 12124, 12125, 12126, 12127, 12128, 12129, 12130, 12131, 12132, @@ -455,7 +455,7 @@ class MultibyteTest extends CakeTestCase { 12149, 12150, 12151, 12152, 12153, 12154, 12155, 12156, 12157, 12158, 12159); $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(45601, 45602, 45603, 45604, 45605, 45606, 45607, 45608, 45609, 45610, 45611, 45612, 45613, 45614, 45615, 45616, 45617, 45618, 45619, 45620, 45621, 45622, 45623, 45624, 45625, 45626, 45627, 45628, 45629, 45630, 45631, 45632, @@ -466,7 +466,7 @@ class MultibyteTest extends CakeTestCase { 45697, 45698, 45699, 45700); $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(65136, 65137, 65138, 65139, 65140, 65141, 65142, 65143, 65144, 65145, 65146, 65147, 65148, 65149, 65150, 65151, 65152, 65153, 65154, 65155, 65156, 65157, 65158, 65159, 65160, 65161, 65162, 65163, 65164, 65165, 65166, 65167, @@ -475,7 +475,7 @@ class MultibyteTest extends CakeTestCase { 65200); $expected = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(65201, 65202, 65203, 65204, 65205, 65206, 65207, 65208, 65209, 65210, 65211, 65212, 65213, 65214, 65215, 65216, 65217, 65218, 65219, 65220, 65221, 65222, 65223, 65224, 65225, 65226, 65227, 65228, 65229, 65230, 65231, 65232, @@ -484,101 +484,101 @@ class MultibyteTest extends CakeTestCase { 65265, 65266, 65267, 65268, 65269, 65270, 65271, 65272, 65273, 65274, 65275, 65276); $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(65345, 65346, 65347, 65348, 65349, 65350, 65351, 65352, 65353, 65354, 65355, 65356, 65357, 65358, 65359, 65360, 65361, 65362, 65363, 65364, 65365, 65366, 65367, 65368, 65369, 65370); $expected = 'abcdefghijklmnopqrstuvwxyz'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(65377, 65378, 65379, 65380, 65381, 65382, 65383, 65384, 65385, 65386, 65387, 65388, 65389, 65390, 65391, 65392, 65393, 65394, 65395, 65396, 65397, 65398, 65399, 65400); $expected = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(65401, 65402, 65403, 65404, 65405, 65406, 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414, 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422, 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430, 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438); $expected = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(292, 275, 314, 316, 335, 44, 32, 372, 337, 345, 316, 271, 33); $expected = 'Ĥēĺļŏ, Ŵőřļď!'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33); $expected = 'Hello, World!'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(168); $expected = '¨'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(191); $expected = '¿'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(269, 105, 110, 105); $expected = 'čini'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(109, 111, 263, 105); $expected = 'moći'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(100, 114, 382, 97, 118, 110, 105); $expected = 'državni'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(25226, 30334, 24230, 35774, 20026, 39318, 39029); $expected = '把百度设为首页'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(19968, 20108, 19977, 21608, 27704, 40845); $expected = '一二三周永龍'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(1280, 1282, 1284, 1286, 1288, 1290, 1292, 1294, 1296, 1298); $expected = 'ԀԂԄԆԈԊԌԎԐԒ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(1281, 1283, 1285, 1287, 1289, 1291, 1293, 1295, 1296, 1298); $expected = 'ԁԃԅԇԉԋԍԏԐԒ'; $result = Multibyte::ascii($utf8); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1415); $result = Multibyte::ascii($utf8); $expected = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415); $result = Multibyte::ascii($utf8); $expected = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293); $result = Multibyte::ascii($utf8); $expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(7680, 7682, 7684, 7686, 7688, 7690, 7692, 7694, 7696, 7698, 7700, 7702, 7704, 7706, 7708, 7710, 7712, 7714, 7716, 7718, 7720, 7722, 7724, 7726, 7728, 7730, 7732, 7734, 7736, 7738, 7740, 7742, 7744, 7746, 7748, 7750, @@ -589,7 +589,7 @@ class MultibyteTest extends CakeTestCase { 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); $result = Multibyte::ascii($utf8); $expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(7681, 7683, 7685, 7687, 7689, 7691, 7693, 7695, 7697, 7699, 7701, 7703, 7705, 7707, 7709, 7711, 7713, 7715, 7717, 7719, 7721, 7723, 7725, 7727, 7729, 7731, 7733, 7735, 7737, 7739, 7741, 7743, 7745, 7747, 7749, 7751, @@ -600,53 +600,53 @@ class MultibyteTest extends CakeTestCase { 7897, 7899, 7901, 7903, 7905, 7907, 7909, 7911, 7913, 7915, 7917, 7919, 7921, 7923, 7925, 7927, 7929); $result = Multibyte::ascii($utf8); $expected = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(8486, 8490, 8491, 8498); $result = Multibyte::ascii($utf8); $expected = 'ΩKÅℲ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(969, 107, 229, 8526); $result = Multibyte::ascii($utf8); $expected = 'ωkåⅎ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(8544, 8545, 8546, 8547, 8548, 8549, 8550, 8551, 8552, 8553, 8554, 8555, 8556, 8557, 8558, 8559, 8579); $result = Multibyte::ascii($utf8); $expected = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(8560, 8561, 8562, 8563, 8564, 8565, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 8573, 8574, 8575, 8580); $result = Multibyte::ascii($utf8); $expected = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(9398, 9399, 9400, 9401, 9402, 9403, 9404, 9405, 9406, 9407, 9408, 9409, 9410, 9411, 9412, 9413, 9414, 9415, 9416, 9417, 9418, 9419, 9420, 9421, 9422, 9423); $result = Multibyte::ascii($utf8); $expected = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(9424, 9425, 9426, 9427, 9428, 9429, 9430, 9431, 9432, 9433, 9434, 9435, 9436, 9437, 9438, 9439, 9440, 9441, 9442, 9443, 9444, 9445, 9446, 9447, 9448, 9449); $result = Multibyte::ascii($utf8); $expected = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(11264, 11265, 11266, 11267, 11268, 11269, 11270, 11271, 11272, 11273, 11274, 11275, 11276, 11277, 11278, 11279, 11280, 11281, 11282, 11283, 11284, 11285, 11286, 11287, 11288, 11289, 11290, 11291, 11292, 11293, 11294, 11295, 11296, 11297, 11298, 11299, 11300, 11301, 11302, 11303, 11304, 11305, 11306, 11307, 11308, 11309, 11310); $result = Multibyte::ascii($utf8); $expected = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(11312, 11313, 11314, 11315, 11316, 11317, 11318, 11319, 11320, 11321, 11322, 11323, 11324, 11325, 11326, 11327, 11328, 11329, 11330, 11331, 11332, 11333, 11334, 11335, 11336, 11337, 11338, 11339, 11340, 11341, 11342, 11343, 11344, 11345, 11346, 11347, 11348, 11349, 11350, 11351, 11352, 11353, 11354, 11355, 11356, 11357, 11358); $result = Multibyte::ascii($utf8); $expected = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(11392, 11394, 11396, 11398, 11400, 11402, 11404, 11406, 11408, 11410, 11412, 11414, 11416, 11418, 11420, 11422, 11424, 11426, 11428, 11430, 11432, 11434, 11436, 11438, 11440, 11442, 11444, 11446, 11448, 11450, @@ -654,7 +654,7 @@ class MultibyteTest extends CakeTestCase { 11482, 11484, 11486, 11488, 11490); $result = Multibyte::ascii($utf8); $expected = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(11393, 11395, 11397, 11399, 11401, 11403, 11405, 11407, 11409, 11411, 11413, 11415, 11417, 11419, 11421, 11423, 11425, 11427, 11429, 11431, 11433, 11435, 11437, 11439, 11441, 11443, 11445, 11447, 11449, 11451, 11453, 11455, @@ -662,12 +662,12 @@ class MultibyteTest extends CakeTestCase { 11489, 11491); $result = Multibyte::ascii($utf8); $expected = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $utf8 = array(64256, 64257, 64258, 64259, 64260, 64261, 64262, 64275, 64276, 64277, 64278, 64279); $result = Multibyte::ascii($utf8); $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -681,241 +681,241 @@ class MultibyteTest extends CakeTestCase { $find = 'f'; $result = mb_stripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; $find = 'f'; $result = mb_stripos($string, $find, 6); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'å'; $result = mb_stripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'å'; $result = mb_stripos($string, $find, 6); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'ċ'; $result = mb_stripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'ċ'; $result = mb_stripos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'f'; $result = mb_stripos($string, $find); $expected = 37; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'Μ'; $result = mb_stripos($string, $find); $expected = 20; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'É'; $result = mb_stripos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_stripos($string, $find); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_stripos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_stripos($string, $find, 40); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'Ʀ'; $result = mb_stripos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'ї'; $result = mb_stripos($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_stripos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_stripos($string, $find, 5); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_stripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_stripos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_stripos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_stripos($string, $find); $expected = 31; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_stripos($string, $find); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_stripos($string, $find); $expected = 46; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_stripos($string, $find); $expected = 45; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_stripos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'K'; $result = mb_stripos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_stripos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_stripos($string, $find); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_stripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'Ő'; $result = mb_stripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'O'; $result = mb_stripos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_stripos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'N'; $result = mb_stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'Ć'; $result = mb_stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'Ž'; $result = mb_stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_stripos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_stripos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'DŽ'; $result = mb_stripos($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -929,241 +929,241 @@ class MultibyteTest extends CakeTestCase { $find = 'f'; $result = Multibyte::stripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; $find = 'f'; $result = Multibyte::stripos($string, $find, 6); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'å'; $result = Multibyte::stripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'å'; $result = Multibyte::stripos($string, $find, 6); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'ċ'; $result = Multibyte::stripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'ċ'; $result = Multibyte::stripos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'f'; $result = Multibyte::stripos($string, $find); $expected = 37; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'Μ'; $result = Multibyte::stripos($string, $find); $expected = 20; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'É'; $result = Multibyte::stripos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::stripos($string, $find); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::stripos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::stripos($string, $find, 40); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'Ʀ'; $result = Multibyte::stripos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'ї'; $result = Multibyte::stripos($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::stripos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::stripos($string, $find, 5); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::stripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::stripos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::stripos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::stripos($string, $find); $expected = 31; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::stripos($string, $find); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::stripos($string, $find); $expected = 46; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::stripos($string, $find); $expected = 45; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::stripos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'K'; $result = Multibyte::stripos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::stripos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::stripos($string, $find); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::stripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'Ő'; $result = Multibyte::stripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'O'; $result = Multibyte::stripos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::stripos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'N'; $result = Multibyte::stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'Ć'; $result = Multibyte::stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'Ž'; $result = Multibyte::stripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::stripos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::stripos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'DŽ'; $result = Multibyte::stripos($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1177,384 +1177,384 @@ class MultibyteTest extends CakeTestCase { $find = 'f'; $result = mb_stristr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $find = 'f'; $result = mb_stristr($string, $find, true); $expected = 'ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'å'; $result = mb_stristr($string, $find); $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'å'; $result = mb_stristr($string, $find, true); $expected = 'ÀÁÂÃÄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'ċ'; $result = mb_stristr($string, $find); $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'ċ'; $result = mb_stristr($string, $find, true); $expected = 'ĀĂĄĆĈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'f'; $result = mb_stristr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'f'; $result = mb_stristr($string, $find, true); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'Μ'; $result = mb_stristr($string, $find); $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'Μ'; $result = mb_stristr($string, $find, true); $expected = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'þ'; $result = mb_stristr($string, $find); $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'þ'; $result = mb_stristr($string, $find, true); $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_stristr($string, $find); $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_stristr($string, $find, true); $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_stristr($string, $find); $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $find = 'Ƹ'; $result = mb_stristr($string, $find, true); $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'Ʀ'; $result = mb_stristr($string, $find); $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'Ʀ'; $result = mb_stristr($string, $find, true); $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'ї'; $result = mb_stristr($string, $find); $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'ї'; $result = mb_stristr($string, $find, true); $expected = 'ЀЁЂЃЄЅІ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_stristr($string, $find); $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_stristr($string, $find, true); $expected = 'МНОП'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_stristr($string, $find); $expected = 'نهوىيًٌٍَُ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_stristr($string, $find, true); $expected = 'فقكلم'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_stristr($string, $find); $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_stristr($string, $find, true); $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_stristr($string, $find); $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_stristr($string, $find, true); $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_stristr($string, $find); $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_stristr($string, $find, true); $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_stristr($string, $find); $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_stristr($string, $find, true); $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_stristr($string, $find); $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_stristr($string, $find, true); $expected = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_stristr($string, $find); $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_stristr($string, $find, true); $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'K'; $result = mb_stristr($string, $find); $expected = 'klmnopqrstuvwxyz'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'K'; $result = mb_stristr($string, $find, true); $expected = 'abcdefghij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_stristr($string, $find); $expected = 'アイウエオカキク'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_stristr($string, $find, true); $expected = '。「」、・ヲァィゥェォャュョッー'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_stristr($string, $find); $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_stristr($string, $find, true); $expected = 'ケコサシスセソタチツテトナニヌネノ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'Ő'; $result = mb_stristr($string, $find); $expected = 'őřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'Ő'; $result = mb_stristr($string, $find, true); $expected = 'Ĥēĺļŏ, Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ĺļ'; $result = mb_stristr($string, $find, true); $expected = 'Ĥē'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'O'; $result = mb_stristr($string, $find); $expected = 'o, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'O'; $result = mb_stristr($string, $find, true); $expected = 'Hell'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = mb_stristr($string, $find); $expected = 'World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = mb_stristr($string, $find, true); $expected = 'Hello, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = mb_stristr($string, $find); $expected = 'llo, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = mb_stristr($string, $find, true); $expected = 'He'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = mb_stristr($string, $find); $expected = 'rld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = mb_stristr($string, $find, true); $expected = 'Hello, Wo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'N'; $result = mb_stristr($string, $find); $expected = 'ni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'N'; $result = mb_stristr($string, $find, true); $expected = 'či'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'Ć'; $result = mb_stristr($string, $find); $expected = 'ći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'Ć'; $result = mb_stristr($string, $find, true); $expected = 'mo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'Ž'; $result = mb_stristr($string, $find); $expected = 'žavni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'Ž'; $result = mb_stristr($string, $find, true); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_stristr($string, $find); $expected = '设为首页'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_stristr($string, $find, true); $expected = '把百度'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_stristr($string, $find); $expected = '周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_stristr($string, $find, true); $expected = '一二三'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '二周'; $result = mb_stristr($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1568,384 +1568,384 @@ class MultibyteTest extends CakeTestCase { $find = 'f'; $result = Multibyte::stristr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $find = 'f'; $result = Multibyte::stristr($string, $find, true); $expected = 'ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'å'; $result = Multibyte::stristr($string, $find); $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'å'; $result = Multibyte::stristr($string, $find, true); $expected = 'ÀÁÂÃÄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'ċ'; $result = Multibyte::stristr($string, $find); $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'ċ'; $result = Multibyte::stristr($string, $find, true); $expected = 'ĀĂĄĆĈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'f'; $result = Multibyte::stristr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'f'; $result = Multibyte::stristr($string, $find, true); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'Μ'; $result = Multibyte::stristr($string, $find); $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'Μ'; $result = Multibyte::stristr($string, $find, true); $expected = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'þ'; $result = Multibyte::stristr($string, $find); $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'þ'; $result = Multibyte::stristr($string, $find, true); $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::stristr($string, $find); $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::stristr($string, $find, true); $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::stristr($string, $find); $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $find = 'Ƹ'; $result = Multibyte::stristr($string, $find, true); $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'Ʀ'; $result = Multibyte::stristr($string, $find); $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'Ʀ'; $result = Multibyte::stristr($string, $find, true); $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'ї'; $result = Multibyte::stristr($string, $find); $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'ї'; $result = Multibyte::stristr($string, $find, true); $expected = 'ЀЁЂЃЄЅІ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::stristr($string, $find); $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::stristr($string, $find, true); $expected = 'МНОП'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::stristr($string, $find); $expected = 'نهوىيًٌٍَُ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::stristr($string, $find, true); $expected = 'فقكلم'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::stristr($string, $find); $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::stristr($string, $find, true); $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::stristr($string, $find); $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::stristr($string, $find, true); $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::stristr($string, $find); $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::stristr($string, $find, true); $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::stristr($string, $find); $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::stristr($string, $find, true); $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::stristr($string, $find); $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::stristr($string, $find, true); $expected = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::stristr($string, $find); $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::stristr($string, $find, true); $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'K'; $result = Multibyte::stristr($string, $find); $expected = 'klmnopqrstuvwxyz'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'K'; $result = Multibyte::stristr($string, $find, true); $expected = 'abcdefghij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::stristr($string, $find); $expected = 'アイウエオカキク'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::stristr($string, $find, true); $expected = '。「」、・ヲァィゥェォャュョッー'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::stristr($string, $find); $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::stristr($string, $find, true); $expected = 'ケコサシスセソタチツテトナニヌネノ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'Ő'; $result = Multibyte::stristr($string, $find); $expected = 'őřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'Ő'; $result = Multibyte::stristr($string, $find, true); $expected = 'Ĥēĺļŏ, Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ĺļ'; $result = Multibyte::stristr($string, $find, true); $expected = 'Ĥē'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'O'; $result = Multibyte::stristr($string, $find); $expected = 'o, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'O'; $result = Multibyte::stristr($string, $find, true); $expected = 'Hell'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = Multibyte::stristr($string, $find); $expected = 'World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = Multibyte::stristr($string, $find, true); $expected = 'Hello, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = Multibyte::stristr($string, $find); $expected = 'llo, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = Multibyte::stristr($string, $find, true); $expected = 'He'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = Multibyte::stristr($string, $find); $expected = 'rld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = Multibyte::stristr($string, $find, true); $expected = 'Hello, Wo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'N'; $result = Multibyte::stristr($string, $find); $expected = 'ni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'N'; $result = Multibyte::stristr($string, $find, true); $expected = 'či'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'Ć'; $result = Multibyte::stristr($string, $find); $expected = 'ći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'Ć'; $result = Multibyte::stristr($string, $find, true); $expected = 'mo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'Ž'; $result = Multibyte::stristr($string, $find); $expected = 'žavni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'Ž'; $result = Multibyte::stristr($string, $find, true); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::stristr($string, $find); $expected = '设为首页'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::stristr($string, $find, true); $expected = '把百度'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::stristr($string, $find); $expected = '周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::stristr($string, $find, true); $expected = '一二三'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '二周'; $result = Multibyte::stristr($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1958,142 +1958,142 @@ class MultibyteTest extends CakeTestCase { $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $result = mb_strlen($string); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $result = mb_strlen($string); $expected = 30; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $result = mb_strlen($string); $expected = 61; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $result = mb_strlen($string); $expected = 94; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $result = mb_strlen($string); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $result = mb_strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $result = mb_strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $result = mb_strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $result = mb_strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $result = mb_strlen($string); $expected = 28; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $result = mb_strlen($string); $expected = 49; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $result = mb_strlen($string); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $result = mb_strlen($string); $expected = 47; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $result = mb_strlen($string); $expected = 96; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $result = mb_strlen($string); $expected = 59; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $result = mb_strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $result = mb_strlen($string); $expected = 65; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $result = mb_strlen($string); $expected = 76; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $result = mb_strlen($string); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $result = mb_strlen($string); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $result = mb_strlen($string); $expected = 38; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $result = mb_strlen($string); $expected = 13; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $result = mb_strlen($string); $expected = 13; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $result = mb_strlen($string); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $result = mb_strlen($string); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $result = mb_strlen($string); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $result = mb_strlen($string); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = mb_strlen($string); $expected = 6; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2106,142 +2106,142 @@ class MultibyteTest extends CakeTestCase { $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $result = Multibyte::strlen($string); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $result = Multibyte::strlen($string); $expected = 30; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $result = Multibyte::strlen($string); $expected = 61; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $result = Multibyte::strlen($string); $expected = 94; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $result = Multibyte::strlen($string); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $result = Multibyte::strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $result = Multibyte::strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $result = Multibyte::strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $result = Multibyte::strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $result = Multibyte::strlen($string); $expected = 28; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $result = Multibyte::strlen($string); $expected = 49; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $result = Multibyte::strlen($string); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $result = Multibyte::strlen($string); $expected = 47; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $result = Multibyte::strlen($string); $expected = 96; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $result = Multibyte::strlen($string); $expected = 59; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $result = Multibyte::strlen($string); $expected = 100; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $result = Multibyte::strlen($string); $expected = 65; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $result = Multibyte::strlen($string); $expected = 76; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $result = Multibyte::strlen($string); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $result = Multibyte::strlen($string); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $result = Multibyte::strlen($string); $expected = 38; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $result = Multibyte::strlen($string); $expected = 13; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $result = Multibyte::strlen($string); $expected = 13; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $result = Multibyte::strlen($string); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $result = Multibyte::strlen($string); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $result = Multibyte::strlen($string); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $result = Multibyte::strlen($string); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = Multibyte::strlen($string); $expected = 6; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2255,241 +2255,241 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = mb_strpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; $find = 'F'; $result = mb_strpos($string, $find, 6); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strpos($string, $find, 6); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strpos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = mb_strpos($string, $find); $expected = 37; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = mb_strpos($string, $find); $expected = 20; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'é'; $result = mb_strpos($string, $find); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_strpos($string, $find); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_strpos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'ƹ'; $result = mb_strpos($string, $find); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = mb_strpos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_strpos($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_strpos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'р'; $result = mb_strpos($string, $find, 5); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_strpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_strpos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_strpos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_strpos($string, $find); $expected = 31; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_strpos($string, $find); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_strpos($string, $find); $expected = 46; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_strpos($string, $find); $expected = 45; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strpos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strpos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_strpos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_strpos($string, $find); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'őř'; $result = mb_strpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strpos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strpos($string, $find, 5); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_strpos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_strpos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '一周'; $result = mb_strpos($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2503,241 +2503,241 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = Multibyte::strpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; $find = 'F'; $result = Multibyte::strpos($string, $find, 6); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strpos($string, $find, 6); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strpos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = Multibyte::strpos($string, $find); $expected = 37; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = Multibyte::strpos($string, $find); $expected = 20; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'é'; $result = Multibyte::strpos($string, $find); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::strpos($string, $find); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::strpos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'ƹ'; $result = Multibyte::strpos($string, $find); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = Multibyte::strpos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::strpos($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::strpos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'р'; $result = Multibyte::strpos($string, $find, 5); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::strpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::strpos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::strpos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::strpos($string, $find); $expected = 31; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::strpos($string, $find); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::strpos($string, $find); $expected = 46; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::strpos($string, $find); $expected = 45; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strpos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strpos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::strpos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::strpos($string, $find); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'őř'; $result = Multibyte::strpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strpos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strpos($string, $find, 5); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::strpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::strpos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::strpos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '一周'; $result = Multibyte::strpos($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2751,378 +2751,378 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = mb_strrchr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $find = 'F'; $result = mb_strrchr($string, $find, true); $expected = 'ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strrchr($string, $find); $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strrchr($string, $find, true); $expected = 'ÀÁÂÃÄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strrchr($string, $find); $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strrchr($string, $find, true); $expected = 'ĀĂĄĆĈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = mb_strrchr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = mb_strrchr($string, $find, true); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = mb_strrchr($string, $find); $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = mb_strrchr($string, $find, true); $expected = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = mb_strrchr($string, $find); $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = mb_strrchr($string, $find, true); $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_strrchr($string, $find); $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_strrchr($string, $find, true); $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_strrchr($string, $find); $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $find = 'Ƹ'; $result = mb_strrchr($string, $find, true); $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = mb_strrchr($string, $find); $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = mb_strrchr($string, $find, true); $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_strrchr($string, $find); $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_strrchr($string, $find, true); $expected = 'ЀЁЂЃЄЅІ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_strrchr($string, $find); $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_strrchr($string, $find, true); $expected = 'МНОП'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_strrchr($string, $find); $expected = 'نهوىيًٌٍَُ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_strrchr($string, $find, true); $expected = 'فقكلم'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_strrchr($string, $find); $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_strrchr($string, $find, true); $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_strrchr($string, $find); $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_strrchr($string, $find, true); $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_strrchr($string, $find); $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_strrchr($string, $find, true); $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_strrchr($string, $find); $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_strrchr($string, $find, true); $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_strrchr($string, $find); $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_strrchr($string, $find, true); $expected = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_strrchr($string, $find); $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_strrchr($string, $find, true); $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strrchr($string, $find); $expected = 'klmnopqrstuvwxyz'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strrchr($string, $find, true); $expected = 'abcdefghij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_strrchr($string, $find); $expected = 'アイウエオカキク'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_strrchr($string, $find, true); $expected = '。「」、・ヲァィゥェォャュョッー'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_strrchr($string, $find); $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_strrchr($string, $find, true); $expected = 'ケコサシスセソタチツテトナニヌネノ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strrchr($string, $find); $expected = 'őřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strrchr($string, $find, true); $expected = 'Ĥēĺļŏ, Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strrchr($string, $find); $expected = 'orld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strrchr($string, $find, true); $expected = 'Hello, W'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = mb_strrchr($string, $find); $expected = 'World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = mb_strrchr($string, $find, true); $expected = 'Hello, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = mb_strrchr($string, $find); $expected = 'llo, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = mb_strrchr($string, $find, true); $expected = 'He'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = mb_strrchr($string, $find); $expected = 'rld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = mb_strrchr($string, $find, true); $expected = 'Hello, Wo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strrchr($string, $find); $expected = 'ni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strrchr($string, $find, true); $expected = 'či'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strrchr($string, $find); $expected = 'ći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strrchr($string, $find, true); $expected = 'mo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_strrchr($string, $find); $expected = 'žavni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_strrchr($string, $find, true); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_strrchr($string, $find); $expected = '设为首页'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_strrchr($string, $find, true); $expected = '把百度'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_strrchr($string, $find); $expected = '周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_strrchr($string, $find, true); $expected = '一二三'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周龍'; $result = mb_strrchr($string, $find, true); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3136,378 +3136,378 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = Multibyte::strrchr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $find = 'F'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strrchr($string, $find); $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ÀÁÂÃÄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strrchr($string, $find); $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ĀĂĄĆĈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = Multibyte::strrchr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = Multibyte::strrchr($string, $find, true); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = Multibyte::strrchr($string, $find); $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = Multibyte::strrchr($string, $find, true); $expected = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = Multibyte::strrchr($string, $find); $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::strrchr($string, $find); $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::strrchr($string, $find); $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $find = 'Ƹ'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = Multibyte::strrchr($string, $find); $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = Multibyte::strrchr($string, $find, true); $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::strrchr($string, $find); $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ЀЁЂЃЄЅІ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::strrchr($string, $find); $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::strrchr($string, $find, true); $expected = 'МНОП'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::strrchr($string, $find); $expected = 'نهوىيًٌٍَُ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::strrchr($string, $find, true); $expected = 'فقكلم'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::strrchr($string, $find); $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::strrchr($string, $find, true); $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::strrchr($string, $find); $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::strrchr($string, $find, true); $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::strrchr($string, $find); $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::strrchr($string, $find, true); $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::strrchr($string, $find); $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::strrchr($string, $find, true); $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::strrchr($string, $find); $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::strrchr($string, $find); $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strrchr($string, $find); $expected = 'klmnopqrstuvwxyz'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strrchr($string, $find, true); $expected = 'abcdefghij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::strrchr($string, $find); $expected = 'アイウエオカキク'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::strrchr($string, $find, true); $expected = '。「」、・ヲァィゥェォャュョッー'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::strrchr($string, $find); $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::strrchr($string, $find, true); $expected = 'ケコサシスセソタチツテトナニヌネノ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strrchr($string, $find); $expected = 'őřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strrchr($string, $find, true); $expected = 'Ĥēĺļŏ, Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strrchr($string, $find); $expected = 'orld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strrchr($string, $find, true); $expected = 'Hello, W'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = Multibyte::strrchr($string, $find); $expected = 'World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = Multibyte::strrchr($string, $find, true); $expected = 'Hello, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = Multibyte::strrchr($string, $find); $expected = 'llo, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = Multibyte::strrchr($string, $find, true); $expected = 'He'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = Multibyte::strrchr($string, $find); $expected = 'rld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = Multibyte::strrchr($string, $find, true); $expected = 'Hello, Wo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strrchr($string, $find); $expected = 'ni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strrchr($string, $find, true); $expected = 'či'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strrchr($string, $find); $expected = 'ći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strrchr($string, $find, true); $expected = 'mo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::strrchr($string, $find); $expected = 'žavni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::strrchr($string, $find, true); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::strrchr($string, $find); $expected = '设为首页'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::strrchr($string, $find, true); $expected = '把百度'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::strrchr($string, $find); $expected = '周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::strrchr($string, $find, true); $expected = '一二三'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周龍'; $result = Multibyte::strrchr($string, $find, true); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3521,378 +3521,378 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = mb_strrichr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $find = 'F'; $result = mb_strrichr($string, $find, true); $expected = 'ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strrichr($string, $find); $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strrichr($string, $find, true); $expected = 'ÀÁÂÃÄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strrichr($string, $find); $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strrichr($string, $find, true); $expected = 'ĀĂĄĆĈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = mb_strrichr($string, $find); $expected = 'fghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = mb_strrichr($string, $find, true); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = mb_strrichr($string, $find); $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = mb_strrichr($string, $find, true); $expected = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = mb_strrichr($string, $find); $expected = 'þÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = mb_strrichr($string, $find, true); $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüý'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_strrichr($string, $find); $expected = 'ņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_strrichr($string, $find, true); $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_strrichr($string, $find); $expected = 'ƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $find = 'Ƹ'; $result = mb_strrichr($string, $find, true); $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = mb_strrichr($string, $find); $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = mb_strrichr($string, $find, true); $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_strrichr($string, $find); $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_strrichr($string, $find, true); $expected = 'ЀЁЂЃЄЅІ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_strrichr($string, $find); $expected = 'рстуфхцчшщъыь'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп'; $find = 'Р'; $result = mb_strrichr($string, $find, true); $expected = 'МНОП'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_strrichr($string, $find); $expected = 'نهوىيًٌٍَُ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_strrichr($string, $find, true); $expected = 'فقكلم'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_strrichr($string, $find); $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_strrichr($string, $find, true); $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_strrichr($string, $find); $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_strrichr($string, $find, true); $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_strrichr($string, $find); $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_strrichr($string, $find, true); $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_strrichr($string, $find); $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_strrichr($string, $find, true); $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_strrichr($string, $find); $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_strrichr($string, $find, true); $expected = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_strrichr($string, $find); $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_strrichr($string, $find, true); $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strrichr($string, $find); $expected = 'klmnopqrstuvwxyz'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strrichr($string, $find, true); $expected = 'abcdefghij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_strrichr($string, $find); $expected = 'アイウエオカキク'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_strrichr($string, $find, true); $expected = '。「」、・ヲァィゥェォャュョッー'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_strrichr($string, $find); $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_strrichr($string, $find, true); $expected = 'ケコサシスセソタチツテトナニヌネノ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strrichr($string, $find); $expected = 'őřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strrichr($string, $find, true); $expected = 'Ĥēĺļŏ, Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strrichr($string, $find); $expected = 'orld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strrichr($string, $find, true); $expected = 'Hello, W'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = mb_strrichr($string, $find); $expected = 'World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = mb_strrichr($string, $find, true); $expected = 'Hello, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = mb_strrichr($string, $find); $expected = 'llo, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = mb_strrichr($string, $find, true); $expected = 'He'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = mb_strrichr($string, $find); $expected = 'rld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = mb_strrichr($string, $find, true); $expected = 'Hello, Wo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strrichr($string, $find); $expected = 'ni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strrichr($string, $find, true); $expected = 'či'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strrichr($string, $find); $expected = 'ći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strrichr($string, $find, true); $expected = 'mo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_strrichr($string, $find); $expected = 'žavni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_strrichr($string, $find, true); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_strrichr($string, $find); $expected = '设为首页'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_strrichr($string, $find, true); $expected = '把百度'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_strrichr($string, $find); $expected = '周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_strrichr($string, $find, true); $expected = '一二三'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '百设'; $result = mb_strrichr($string, $find, true); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3906,378 +3906,378 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = Multibyte::strrichr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $find = 'F'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strrichr($string, $find); $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ÀÁÂÃÄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strrichr($string, $find); $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ĀĂĄĆĈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = Multibyte::strrichr($string, $find); $expected = 'fghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = Multibyte::strrichr($string, $find, true); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = Multibyte::strrichr($string, $find); $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = Multibyte::strrichr($string, $find, true); $expected = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = Multibyte::strrichr($string, $find); $expected = 'þÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüý'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::strrichr($string, $find); $expected = 'ņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::strrichr($string, $find); $expected = 'ƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $find = 'Ƹ'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = Multibyte::strrichr($string, $find); $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = Multibyte::strrichr($string, $find, true); $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::strrichr($string, $find); $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ЀЁЂЃЄЅІ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::strrichr($string, $find); $expected = 'рстуфхцчшщъыь'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп'; $find = 'Р'; $result = Multibyte::strrichr($string, $find, true); $expected = 'МНОП'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::strrichr($string, $find); $expected = 'نهوىيًٌٍَُ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::strrichr($string, $find, true); $expected = 'فقكلم'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::strrichr($string, $find); $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::strrichr($string, $find, true); $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::strrichr($string, $find); $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::strrichr($string, $find, true); $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::strrichr($string, $find); $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::strrichr($string, $find, true); $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::strrichr($string, $find); $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::strrichr($string, $find, true); $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::strrichr($string, $find); $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::strrichr($string, $find); $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strrichr($string, $find); $expected = 'klmnopqrstuvwxyz'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strrichr($string, $find, true); $expected = 'abcdefghij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::strrichr($string, $find); $expected = 'アイウエオカキク'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::strrichr($string, $find, true); $expected = '。「」、・ヲァィゥェォャュョッー'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::strrichr($string, $find); $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::strrichr($string, $find, true); $expected = 'ケコサシスセソタチツテトナニヌネノ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strrichr($string, $find); $expected = 'őřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strrichr($string, $find, true); $expected = 'Ĥēĺļŏ, Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strrichr($string, $find); $expected = 'orld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strrichr($string, $find, true); $expected = 'Hello, W'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = Multibyte::strrichr($string, $find); $expected = 'World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = Multibyte::strrichr($string, $find, true); $expected = 'Hello, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = Multibyte::strrichr($string, $find); $expected = 'llo, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = Multibyte::strrichr($string, $find, true); $expected = 'He'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = Multibyte::strrichr($string, $find); $expected = 'rld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = Multibyte::strrichr($string, $find, true); $expected = 'Hello, Wo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strrichr($string, $find); $expected = 'ni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strrichr($string, $find, true); $expected = 'či'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strrichr($string, $find); $expected = 'ći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strrichr($string, $find, true); $expected = 'mo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::strrichr($string, $find); $expected = 'žavni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::strrichr($string, $find, true); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::strrichr($string, $find); $expected = '设为首页'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::strrichr($string, $find, true); $expected = '把百度'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::strrichr($string, $find); $expected = '周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::strrichr($string, $find, true); $expected = '一二三'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '百设'; $result = Multibyte::strrichr($string, $find, true); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -4291,241 +4291,241 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = mb_strripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; $find = 'F'; $result = mb_strripos($string, $find, 6); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strripos($string, $find, 6); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'ÓÔ'; $result = mb_strripos($string, $find); $expected = 19; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strripos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = mb_strripos($string, $find); $expected = 69; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = mb_strripos($string, $find); $expected = 20; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'é'; $result = mb_strripos($string, $find); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_strripos($string, $find); $expected = 25; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_strripos($string, $find); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'ƹ'; $result = mb_strripos($string, $find); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = mb_strripos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_strripos($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_strripos($string, $find); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'р'; $result = mb_strripos($string, $find, 5); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_strripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_strripos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_strripos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_strripos($string, $find); $expected = 31; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_strripos($string, $find); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_strripos($string, $find); $expected = 46; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_strripos($string, $find); $expected = 45; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strripos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strripos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnoppqrstuvwxyz'; $find = 'pp'; $result = mb_strripos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_strripos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_strripos($string, $find); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strripos($string, $find, 5); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_strripos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_strripos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'dž'; @@ -4544,247 +4544,247 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = Multibyte::strripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; $find = 'F'; $result = Multibyte::strripos($string, $find, 6); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strripos($string, $find, 6); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'ÓÔ'; $result = Multibyte::strripos($string, $find); $expected = 19; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strripos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = Multibyte::strripos($string, $find); $expected = 69; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = Multibyte::strripos($string, $find); $expected = 20; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'é'; $result = Multibyte::strripos($string, $find); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::strripos($string, $find); $expected = 25; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::strripos($string, $find); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'ƹ'; $result = Multibyte::strripos($string, $find); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = Multibyte::strripos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::strripos($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::strripos($string, $find); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'р'; $result = Multibyte::strripos($string, $find, 5); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::strripos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::strripos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::strripos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::strripos($string, $find); $expected = 31; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::strripos($string, $find); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::strripos($string, $find); $expected = 46; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::strripos($string, $find); $expected = 45; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strripos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strripos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnoppqrstuvwxyz'; $find = 'pp'; $result = Multibyte::strripos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::strripos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::strripos($string, $find); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strripos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strripos($string, $find, 5); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::strripos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::strripos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::strripos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'dž'; $result = Multibyte::strripos($string, $find); $expected = 0; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -4802,247 +4802,247 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = mb_strrpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; $find = 'F'; $result = mb_strrpos($string, $find, 6); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strrpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'ÙÚ'; $result = mb_strrpos($string, $find); $expected = 25; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strrpos($string, $find, 6); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strrpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strrpos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = mb_strrpos($string, $find); $expected = 37; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = mb_strrpos($string, $find); $expected = 20; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'é'; $result = mb_strrpos($string, $find); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_strrpos($string, $find); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_strrpos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'ƹ'; $result = mb_strrpos($string, $find); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = mb_strrpos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_strrpos($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_strrpos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'р'; $result = mb_strrpos($string, $find, 5); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_strrpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_strrpos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_strrpos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_strrpos($string, $find); $expected = 31; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_strrpos($string, $find); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_strrpos($string, $find); $expected = 46; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_strrpos($string, $find); $expected = 45; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strrpos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strrpos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnoppqrstuvwxyz'; $find = 'pp'; $result = mb_strrpos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_strrpos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_strrpos($string, $find); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strrpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strrpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strrpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strrpos($string, $find, 5); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_strrpos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_strrpos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'H'; $result = mb_strrpos($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5056,247 +5056,247 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = Multibyte::strrpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSTUVWXYZ0123456789'; $find = 'F'; $result = Multibyte::strrpos($string, $find, 6); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strrpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strrpos($string, $find, 6); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞ'; $find = 'ÙÚ'; $result = Multibyte::strrpos($string, $find); $expected = 25; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strrpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strrpos($string, $find, 6); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = Multibyte::strrpos($string, $find); $expected = 37; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = Multibyte::strrpos($string, $find); $expected = 20; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'é'; $result = Multibyte::strrpos($string, $find); $expected = 32; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::strrpos($string, $find); $expected = 24; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::strrpos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'ƹ'; $result = Multibyte::strrpos($string, $find); $expected = 40; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = Multibyte::strrpos($string, $find); $expected = 39; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::strrpos($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::strrpos($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'р'; $result = Multibyte::strrpos($string, $find, 5); $expected = 36; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::strrpos($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::strrpos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::strrpos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::strrpos($string, $find); $expected = 31; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::strrpos($string, $find); $expected = 26; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::strrpos($string, $find); $expected = 46; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::strrpos($string, $find); $expected = 45; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strrpos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strrpos($string, $find); $expected = 10; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnoppqrstuvwxyz'; $find = 'pp'; $result = Multibyte::strrpos($string, $find); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::strrpos($string, $find); $expected = 16; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::strrpos($string, $find); $expected = 17; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strrpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strrpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strrpos($string, $find); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strrpos($string, $find, 5); $expected = 8; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::strrpos($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::strrpos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::strrpos($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'H'; $result = Multibyte::strrpos($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5310,390 +5310,390 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = mb_strstr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $find = 'F'; $result = mb_strstr($string, $find, true); $expected = 'ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strstr($string, $find); $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = mb_strstr($string, $find, true); $expected = 'ÀÁÂÃÄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strstr($string, $find); $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_strstr($string, $find, true); $expected = 'ĀĂĄĆĈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = mb_strstr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = mb_strstr($string, $find, true); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = mb_strstr($string, $find); $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = mb_strstr($string, $find, true); $expected = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = mb_strstr($string, $find); $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = mb_strstr($string, $find, true); $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_strstr($string, $find); $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = mb_strstr($string, $find, true); $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_strstr($string, $find); $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $find = 'Ƹ'; $result = mb_strstr($string, $find, true); $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = mb_strstr($string, $find); $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = mb_strstr($string, $find, true); $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_strstr($string, $find); $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_strstr($string, $find, true); $expected = 'ЀЁЂЃЄЅІ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_strstr($string, $find); $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_strstr($string, $find, true); $expected = 'МНОП'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_strstr($string, $find); $expected = 'نهوىيًٌٍَُ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = mb_strstr($string, $find, true); $expected = 'فقكلم'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_strstr($string, $find); $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_strstr($string, $find, true); $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_strstr($string, $find); $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_strstr($string, $find, true); $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_strstr($string, $find); $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_strstr($string, $find, true); $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_strstr($string, $find); $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = mb_strstr($string, $find, true); $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_strstr($string, $find); $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = mb_strstr($string, $find, true); $expected = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_strstr($string, $find); $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = mb_strstr($string, $find, true); $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strstr($string, $find); $expected = 'klmnopqrstuvwxyz'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = mb_strstr($string, $find, true); $expected = 'abcdefghij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'K'; $result = mb_strstr($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_strstr($string, $find); $expected = 'アイウエオカキク'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_strstr($string, $find, true); $expected = '。「」、・ヲァィゥェォャュョッー'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_strstr($string, $find); $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_strstr($string, $find, true); $expected = 'ケコサシスセソタチツテトナニヌネノ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strstr($string, $find); $expected = 'őřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_strstr($string, $find, true); $expected = 'Ĥēĺļŏ, Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ĺļ'; $result = mb_strstr($string, $find, true); $expected = 'Ĥē'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strstr($string, $find); $expected = 'o, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_strstr($string, $find, true); $expected = 'Hell'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = mb_strstr($string, $find); $expected = 'World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = mb_strstr($string, $find, true); $expected = 'Hello, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = mb_strstr($string, $find); $expected = 'llo, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = mb_strstr($string, $find, true); $expected = 'He'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = mb_strstr($string, $find); $expected = 'rld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = mb_strstr($string, $find, true); $expected = 'Hello, Wo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strstr($string, $find); $expected = 'ni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_strstr($string, $find, true); $expected = 'či'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strstr($string, $find); $expected = 'ći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_strstr($string, $find, true); $expected = 'mo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_strstr($string, $find); $expected = 'žavni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_strstr($string, $find, true); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_strstr($string, $find); $expected = '设为首页'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_strstr($string, $find, true); $expected = '把百度'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_strstr($string, $find); $expected = '周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_strstr($string, $find, true); $expected = '一二三'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '二周'; $result = mb_strstr($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5707,390 +5707,390 @@ class MultibyteTest extends CakeTestCase { $find = 'F'; $result = Multibyte::strstr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ0123456789'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $find = 'F'; $result = Multibyte::strstr($string, $find, true); $expected = 'ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strstr($string, $find); $expected = 'ÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $find = 'Å'; $result = Multibyte::strstr($string, $find, true); $expected = 'ÀÁÂÃÄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strstr($string, $find); $expected = 'ĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::strstr($string, $find, true); $expected = 'ĀĂĄĆĈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = Multibyte::strstr($string, $find); $expected = 'FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $find = 'F'; $result = Multibyte::strstr($string, $find, true); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = Multibyte::strstr($string, $find); $expected = 'µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $find = 'µ'; $result = Multibyte::strstr($string, $find, true); $expected = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = Multibyte::strstr($string, $find); $expected = 'Þßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $find = 'Þ'; $result = Multibyte::strstr($string, $find, true); $expected = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::strstr($string, $find); $expected = 'ŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'Ņ'; $result = Multibyte::strstr($string, $find, true); $expected = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::strstr($string, $find); $expected = 'ƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $find = 'Ƹ'; $result = Multibyte::strstr($string, $find, true); $expected = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = Multibyte::strstr($string, $find); $expected = 'ʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $find = 'ʀ'; $result = Multibyte::strstr($string, $find, true); $expected = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::strstr($string, $find); $expected = 'ЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::strstr($string, $find, true); $expected = 'ЀЁЂЃЄЅІ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::strstr($string, $find); $expected = 'РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::strstr($string, $find, true); $expected = 'МНОП'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::strstr($string, $find); $expected = 'نهوىيًٌٍَُ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $find = 'ن'; $result = Multibyte::strstr($string, $find, true); $expected = 'فقكلم'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::strstr($string, $find); $expected = '✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::strstr($string, $find, true); $expected = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::strstr($string, $find); $expected = '⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::strstr($string, $find, true); $expected = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::strstr($string, $find); $expected = '⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::strstr($string, $find, true); $expected = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::strstr($string, $find); $expected = '눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눻'; $result = Multibyte::strstr($string, $find, true); $expected = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::strstr($string, $find); $expected = 'ﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞ'; $result = Multibyte::strstr($string, $find, true); $expected = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::strstr($string, $find); $expected = 'ﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::strstr($string, $find, true); $expected = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strstr($string, $find); $expected = 'klmnopqrstuvwxyz'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'k'; $result = Multibyte::strstr($string, $find, true); $expected = 'abcdefghij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $find = 'K'; $result = Multibyte::strstr($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::strstr($string, $find); $expected = 'アイウエオカキク'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::strstr($string, $find, true); $expected = '。「」、・ヲァィゥェォャュョッー'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::strstr($string, $find); $expected = 'ハヒフヘホマミムメモヤユヨラリルレロワン゙'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::strstr($string, $find, true); $expected = 'ケコサシスセソタチツテトナニヌネノ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strstr($string, $find); $expected = 'őřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::strstr($string, $find, true); $expected = 'Ĥēĺļŏ, Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ĺļ'; $result = Multibyte::strstr($string, $find, true); $expected = 'Ĥē'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strstr($string, $find); $expected = 'o, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::strstr($string, $find, true); $expected = 'Hell'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = Multibyte::strstr($string, $find); $expected = 'World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'Wo'; $result = Multibyte::strstr($string, $find, true); $expected = 'Hello, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = Multibyte::strstr($string, $find); $expected = 'llo, World!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'll'; $result = Multibyte::strstr($string, $find, true); $expected = 'He'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = Multibyte::strstr($string, $find); $expected = 'rld!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rld'; $result = Multibyte::strstr($string, $find, true); $expected = 'Hello, Wo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strstr($string, $find); $expected = 'ni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::strstr($string, $find, true); $expected = 'či'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strstr($string, $find); $expected = 'ći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::strstr($string, $find, true); $expected = 'mo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::strstr($string, $find); $expected = 'žavni'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::strstr($string, $find, true); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::strstr($string, $find); $expected = '设为首页'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::strstr($string, $find, true); $expected = '把百度'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::strstr($string, $find); $expected = '周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::strstr($string, $find, true); $expected = '一二三'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '二周'; $result = Multibyte::strstr($string, $find); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -6103,522 +6103,522 @@ class MultibyteTest extends CakeTestCase { $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~'; $result = mb_strtolower($string); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@'; $result = mb_strtolower($string); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'À'; $result = mb_strtolower($string); $expected = 'à'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Á'; $result = mb_strtolower($string); $expected = 'á'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Â'; $result = mb_strtolower($string); $expected = 'â'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ã'; $result = mb_strtolower($string); $expected = 'ã'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ä'; $result = mb_strtolower($string); $expected = 'ä'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Å'; $result = mb_strtolower($string); $expected = 'å'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Æ'; $result = mb_strtolower($string); $expected = 'æ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ç'; $result = mb_strtolower($string); $expected = 'ç'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'È'; $result = mb_strtolower($string); $expected = 'è'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'É'; $result = mb_strtolower($string); $expected = 'é'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ê'; $result = mb_strtolower($string); $expected = 'ê'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ë'; $result = mb_strtolower($string); $expected = 'ë'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ì'; $result = mb_strtolower($string); $expected = 'ì'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Í'; $result = mb_strtolower($string); $expected = 'í'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Î'; $result = mb_strtolower($string); $expected = 'î'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ï'; $result = mb_strtolower($string); $expected = 'ï'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ð'; $result = mb_strtolower($string); $expected = 'ð'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ñ'; $result = mb_strtolower($string); $expected = 'ñ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ò'; $result = mb_strtolower($string); $expected = 'ò'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ó'; $result = mb_strtolower($string); $expected = 'ó'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ô'; $result = mb_strtolower($string); $expected = 'ô'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Õ'; $result = mb_strtolower($string); $expected = 'õ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ö'; $result = mb_strtolower($string); $expected = 'ö'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ø'; $result = mb_strtolower($string); $expected = 'ø'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ù'; $result = mb_strtolower($string); $expected = 'ù'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ú'; $result = mb_strtolower($string); $expected = 'ú'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Û'; $result = mb_strtolower($string); $expected = 'û'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ü'; $result = mb_strtolower($string); $expected = 'ü'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ý'; $result = mb_strtolower($string); $expected = 'ý'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Þ'; $result = mb_strtolower($string); $expected = 'þ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $result = mb_strtolower($string); $expected = 'àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ā'; $result = mb_strtolower($string); $expected = 'ā'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ă'; $result = mb_strtolower($string); $expected = 'ă'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ą'; $result = mb_strtolower($string); $expected = 'ą'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ć'; $result = mb_strtolower($string); $expected = 'ć'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĉ'; $result = mb_strtolower($string); $expected = 'ĉ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ċ'; $result = mb_strtolower($string); $expected = 'ċ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Č'; $result = mb_strtolower($string); $expected = 'č'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ď'; $result = mb_strtolower($string); $expected = 'ď'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Đ'; $result = mb_strtolower($string); $expected = 'đ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ē'; $result = mb_strtolower($string); $expected = 'ē'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĕ'; $result = mb_strtolower($string); $expected = 'ĕ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ė'; $result = mb_strtolower($string); $expected = 'ė'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ę'; $result = mb_strtolower($string); $expected = 'ę'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ě'; $result = mb_strtolower($string); $expected = 'ě'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĝ'; $result = mb_strtolower($string); $expected = 'ĝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ğ'; $result = mb_strtolower($string); $expected = 'ğ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ġ'; $result = mb_strtolower($string); $expected = 'ġ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ģ'; $result = mb_strtolower($string); $expected = 'ģ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥ'; $result = mb_strtolower($string); $expected = 'ĥ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ħ'; $result = mb_strtolower($string); $expected = 'ħ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĩ'; $result = mb_strtolower($string); $expected = 'ĩ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ī'; $result = mb_strtolower($string); $expected = 'ī'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĭ'; $result = mb_strtolower($string); $expected = 'ĭ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Į'; $result = mb_strtolower($string); $expected = 'į'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'IJ'; $result = mb_strtolower($string); $expected = 'ij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĵ'; $result = mb_strtolower($string); $expected = 'ĵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ķ'; $result = mb_strtolower($string); $expected = 'ķ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĺ'; $result = mb_strtolower($string); $expected = 'ĺ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ļ'; $result = mb_strtolower($string); $expected = 'ļ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ľ'; $result = mb_strtolower($string); $expected = 'ľ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŀ'; $result = mb_strtolower($string); $expected = 'ŀ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ł'; $result = mb_strtolower($string); $expected = 'ł'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ń'; $result = mb_strtolower($string); $expected = 'ń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ņ'; $result = mb_strtolower($string); $expected = 'ņ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ň'; $result = mb_strtolower($string); $expected = 'ň'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŋ'; $result = mb_strtolower($string); $expected = 'ŋ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ō'; $result = mb_strtolower($string); $expected = 'ō'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŏ'; $result = mb_strtolower($string); $expected = 'ŏ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ő'; $result = mb_strtolower($string); $expected = 'ő'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Œ'; $result = mb_strtolower($string); $expected = 'œ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŕ'; $result = mb_strtolower($string); $expected = 'ŕ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŗ'; $result = mb_strtolower($string); $expected = 'ŗ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ř'; $result = mb_strtolower($string); $expected = 'ř'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ś'; $result = mb_strtolower($string); $expected = 'ś'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŝ'; $result = mb_strtolower($string); $expected = 'ŝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ş'; $result = mb_strtolower($string); $expected = 'ş'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Š'; $result = mb_strtolower($string); $expected = 'š'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ţ'; $result = mb_strtolower($string); $expected = 'ţ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ť'; $result = mb_strtolower($string); $expected = 'ť'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŧ'; $result = mb_strtolower($string); $expected = 'ŧ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ũ'; $result = mb_strtolower($string); $expected = 'ũ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ū'; $result = mb_strtolower($string); $expected = 'ū'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŭ'; $result = mb_strtolower($string); $expected = 'ŭ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ů'; $result = mb_strtolower($string); $expected = 'ů'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ű'; $result = mb_strtolower($string); $expected = 'ű'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ų'; $result = mb_strtolower($string); $expected = 'ų'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŵ'; $result = mb_strtolower($string); $expected = 'ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŷ'; $result = mb_strtolower($string); $expected = 'ŷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ź'; $result = mb_strtolower($string); $expected = 'ź'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ż'; $result = mb_strtolower($string); $expected = 'ż'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ž'; $result = mb_strtolower($string); $expected = 'ž'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $result = mb_strtolower($string); $expected = 'āăąćĉċčďđēĕėęěĝğġģĥħĩīĭįijĵķĺļľŀłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĤĒĹĻŎ, ŴŐŘĻĎ!'; $result = mb_strtolower($string); $expected = 'ĥēĺļŏ, ŵőřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĥēĺļŏ, ŵőřļď!'; $result = mb_strtolower($string); $expected = 'ĥēĺļŏ, ŵőřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ἈΙ'; $result = mb_strtolower($string); $expected = 'ἀι'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ԀԂԄԆԈԊԌԎԐԒ'; $result = mb_strtolower($string); $expected = 'ԁԃԅԇԉԋԍԏԑԓ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; $result = mb_strtolower($string); $expected = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; $result = mb_strtolower($string); $expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; $result = mb_strtolower($string); $expected = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ΩKÅ'; $result = mb_strtolower($string); $expected = 'ωkå'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ΩKÅ'; $result = mb_strtolower($string); $expected = 'ωkå'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); /* mb_strtolower does not work for these strings. @@ -6626,27 +6626,27 @@ mb_strtolower does not work for these strings. $string = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; $result = mb_strtolower($string); $expected = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; $result = mb_strtolower($string); $expected = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; $result = mb_strtolower($string); $expected = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; $result = mb_strtolower($string); $expected = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); */ $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; $result = mb_strtolower($string); $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -6659,552 +6659,552 @@ mb_strtolower does not work for these strings. $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~'; $result = Multibyte::strtolower($string); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@'; $result = Multibyte::strtolower($string); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'À'; $result = Multibyte::strtolower($string); $expected = 'à'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Á'; $result = Multibyte::strtolower($string); $expected = 'á'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Â'; $result = Multibyte::strtolower($string); $expected = 'â'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ã'; $result = Multibyte::strtolower($string); $expected = 'ã'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ä'; $result = Multibyte::strtolower($string); $expected = 'ä'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Å'; $result = Multibyte::strtolower($string); $expected = 'å'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Æ'; $result = Multibyte::strtolower($string); $expected = 'æ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ç'; $result = Multibyte::strtolower($string); $expected = 'ç'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'È'; $result = Multibyte::strtolower($string); $expected = 'è'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'É'; $result = Multibyte::strtolower($string); $expected = 'é'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ê'; $result = Multibyte::strtolower($string); $expected = 'ê'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ë'; $result = Multibyte::strtolower($string); $expected = 'ë'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ì'; $result = Multibyte::strtolower($string); $expected = 'ì'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Í'; $result = Multibyte::strtolower($string); $expected = 'í'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Î'; $result = Multibyte::strtolower($string); $expected = 'î'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ï'; $result = Multibyte::strtolower($string); $expected = 'ï'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ð'; $result = Multibyte::strtolower($string); $expected = 'ð'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ñ'; $result = Multibyte::strtolower($string); $expected = 'ñ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ò'; $result = Multibyte::strtolower($string); $expected = 'ò'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ó'; $result = Multibyte::strtolower($string); $expected = 'ó'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ô'; $result = Multibyte::strtolower($string); $expected = 'ô'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Õ'; $result = Multibyte::strtolower($string); $expected = 'õ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ö'; $result = Multibyte::strtolower($string); $expected = 'ö'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ø'; $result = Multibyte::strtolower($string); $expected = 'ø'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ù'; $result = Multibyte::strtolower($string); $expected = 'ù'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ú'; $result = Multibyte::strtolower($string); $expected = 'ú'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Û'; $result = Multibyte::strtolower($string); $expected = 'û'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ü'; $result = Multibyte::strtolower($string); $expected = 'ü'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ý'; $result = Multibyte::strtolower($string); $expected = 'ý'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Þ'; $result = Multibyte::strtolower($string); $expected = 'þ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $result = Multibyte::strtolower($string); $expected = 'àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ā'; $result = Multibyte::strtolower($string); $expected = 'ā'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ă'; $result = Multibyte::strtolower($string); $expected = 'ă'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ą'; $result = Multibyte::strtolower($string); $expected = 'ą'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ć'; $result = Multibyte::strtolower($string); $expected = 'ć'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĉ'; $result = Multibyte::strtolower($string); $expected = 'ĉ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ċ'; $result = Multibyte::strtolower($string); $expected = 'ċ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Č'; $result = Multibyte::strtolower($string); $expected = 'č'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ď'; $result = Multibyte::strtolower($string); $expected = 'ď'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Đ'; $result = Multibyte::strtolower($string); $expected = 'đ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ē'; $result = Multibyte::strtolower($string); $expected = 'ē'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĕ'; $result = Multibyte::strtolower($string); $expected = 'ĕ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ė'; $result = Multibyte::strtolower($string); $expected = 'ė'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ę'; $result = Multibyte::strtolower($string); $expected = 'ę'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ě'; $result = Multibyte::strtolower($string); $expected = 'ě'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĝ'; $result = Multibyte::strtolower($string); $expected = 'ĝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ğ'; $result = Multibyte::strtolower($string); $expected = 'ğ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ġ'; $result = Multibyte::strtolower($string); $expected = 'ġ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ģ'; $result = Multibyte::strtolower($string); $expected = 'ģ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥ'; $result = Multibyte::strtolower($string); $expected = 'ĥ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ħ'; $result = Multibyte::strtolower($string); $expected = 'ħ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĩ'; $result = Multibyte::strtolower($string); $expected = 'ĩ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ī'; $result = Multibyte::strtolower($string); $expected = 'ī'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĭ'; $result = Multibyte::strtolower($string); $expected = 'ĭ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Į'; $result = Multibyte::strtolower($string); $expected = 'į'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'IJ'; $result = Multibyte::strtolower($string); $expected = 'ij'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĵ'; $result = Multibyte::strtolower($string); $expected = 'ĵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ķ'; $result = Multibyte::strtolower($string); $expected = 'ķ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĺ'; $result = Multibyte::strtolower($string); $expected = 'ĺ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ļ'; $result = Multibyte::strtolower($string); $expected = 'ļ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ľ'; $result = Multibyte::strtolower($string); $expected = 'ľ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŀ'; $result = Multibyte::strtolower($string); $expected = 'ŀ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ł'; $result = Multibyte::strtolower($string); $expected = 'ł'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ń'; $result = Multibyte::strtolower($string); $expected = 'ń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ņ'; $result = Multibyte::strtolower($string); $expected = 'ņ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ň'; $result = Multibyte::strtolower($string); $expected = 'ň'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŋ'; $result = Multibyte::strtolower($string); $expected = 'ŋ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ō'; $result = Multibyte::strtolower($string); $expected = 'ō'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŏ'; $result = Multibyte::strtolower($string); $expected = 'ŏ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ő'; $result = Multibyte::strtolower($string); $expected = 'ő'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Œ'; $result = Multibyte::strtolower($string); $expected = 'œ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŕ'; $result = Multibyte::strtolower($string); $expected = 'ŕ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŗ'; $result = Multibyte::strtolower($string); $expected = 'ŗ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ř'; $result = Multibyte::strtolower($string); $expected = 'ř'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ś'; $result = Multibyte::strtolower($string); $expected = 'ś'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŝ'; $result = Multibyte::strtolower($string); $expected = 'ŝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ş'; $result = Multibyte::strtolower($string); $expected = 'ş'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Š'; $result = Multibyte::strtolower($string); $expected = 'š'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ţ'; $result = Multibyte::strtolower($string); $expected = 'ţ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ť'; $result = Multibyte::strtolower($string); $expected = 'ť'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŧ'; $result = Multibyte::strtolower($string); $expected = 'ŧ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ũ'; $result = Multibyte::strtolower($string); $expected = 'ũ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ū'; $result = Multibyte::strtolower($string); $expected = 'ū'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŭ'; $result = Multibyte::strtolower($string); $expected = 'ŭ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ů'; $result = Multibyte::strtolower($string); $expected = 'ů'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ű'; $result = Multibyte::strtolower($string); $expected = 'ű'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ų'; $result = Multibyte::strtolower($string); $expected = 'ų'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŵ'; $result = Multibyte::strtolower($string); $expected = 'ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ŷ'; $result = Multibyte::strtolower($string); $expected = 'ŷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ź'; $result = Multibyte::strtolower($string); $expected = 'ź'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ż'; $result = Multibyte::strtolower($string); $expected = 'ż'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ž'; $result = Multibyte::strtolower($string); $expected = 'ž'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $result = Multibyte::strtolower($string); $expected = 'āăąćĉċčďđēĕėęěĝğġģĥħĩīĭįijĵķĺļľŀłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĤĒĹĻŎ, ŴŐŘĻĎ!'; $result = Multibyte::strtolower($string); $expected = 'ĥēĺļŏ, ŵőřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĥēĺļŏ, ŵőřļď!'; $result = Multibyte::strtolower($string); $expected = 'ĥēĺļŏ, ŵőřļď!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ἈΙ'; $result = Multibyte::strtolower($string); $expected = 'ἀι'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ԀԂԄԆԈԊԌԎԐԒ'; $result = Multibyte::strtolower($string); $expected = 'ԁԃԅԇԉԋԍԏԐԒ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; $result = Multibyte::strtolower($string); $expected = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; $result = Multibyte::strtolower($string); $expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; $result = Multibyte::strtolower($string); $expected = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ΩKÅℲ'; $result = Multibyte::strtolower($string); $expected = 'ωkåⅎ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ΩKÅ'; $result = Multibyte::strtolower($string); $expected = 'ωkå'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ΩKÅ'; $result = Multibyte::strtolower($string); $expected = 'ωkå'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; $result = Multibyte::strtolower($string); $expected = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; $result = Multibyte::strtolower($string); $expected = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; $result = Multibyte::strtolower($string); $expected = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; $result = Multibyte::strtolower($string); $expected = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; $result = Multibyte::strtolower($string); $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -7217,512 +7217,512 @@ mb_strtolower does not work for these strings. $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $result = mb_strtoupper($string); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@'; $result = mb_strtoupper($string); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'à'; $result = mb_strtoupper($string); $expected = 'À'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'á'; $result = mb_strtoupper($string); $expected = 'Á'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'â'; $result = mb_strtoupper($string); $expected = 'Â'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ã'; $result = mb_strtoupper($string); $expected = 'Ã'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ä'; $result = mb_strtoupper($string); $expected = 'Ä'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'å'; $result = mb_strtoupper($string); $expected = 'Å'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'æ'; $result = mb_strtoupper($string); $expected = 'Æ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ç'; $result = mb_strtoupper($string); $expected = 'Ç'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'è'; $result = mb_strtoupper($string); $expected = 'È'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'é'; $result = mb_strtoupper($string); $expected = 'É'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ê'; $result = mb_strtoupper($string); $expected = 'Ê'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ë'; $result = mb_strtoupper($string); $expected = 'Ë'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ì'; $result = mb_strtoupper($string); $expected = 'Ì'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'í'; $result = mb_strtoupper($string); $expected = 'Í'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'î'; $result = mb_strtoupper($string); $expected = 'Î'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ï'; $result = mb_strtoupper($string); $expected = 'Ï'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ð'; $result = mb_strtoupper($string); $expected = 'Ð'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ñ'; $result = mb_strtoupper($string); $expected = 'Ñ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ò'; $result = mb_strtoupper($string); $expected = 'Ò'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ó'; $result = mb_strtoupper($string); $expected = 'Ó'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ô'; $result = mb_strtoupper($string); $expected = 'Ô'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'õ'; $result = mb_strtoupper($string); $expected = 'Õ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ö'; $result = mb_strtoupper($string); $expected = 'Ö'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ø'; $result = mb_strtoupper($string); $expected = 'Ø'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ù'; $result = mb_strtoupper($string); $expected = 'Ù'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ú'; $result = mb_strtoupper($string); $expected = 'Ú'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'û'; $result = mb_strtoupper($string); $expected = 'Û'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ü'; $result = mb_strtoupper($string); $expected = 'Ü'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ý'; $result = mb_strtoupper($string); $expected = 'Ý'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'þ'; $result = mb_strtoupper($string); $expected = 'Þ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ'; $result = mb_strtoupper($string); $expected = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ā'; $result = mb_strtoupper($string); $expected = 'Ā'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ă'; $result = mb_strtoupper($string); $expected = 'Ă'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ą'; $result = mb_strtoupper($string); $expected = 'Ą'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ć'; $result = mb_strtoupper($string); $expected = 'Ć'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĉ'; $result = mb_strtoupper($string); $expected = 'Ĉ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ċ'; $result = mb_strtoupper($string); $expected = 'Ċ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'č'; $result = mb_strtoupper($string); $expected = 'Č'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ď'; $result = mb_strtoupper($string); $expected = 'Ď'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'đ'; $result = mb_strtoupper($string); $expected = 'Đ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ē'; $result = mb_strtoupper($string); $expected = 'Ē'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĕ'; $result = mb_strtoupper($string); $expected = 'Ĕ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ė'; $result = mb_strtoupper($string); $expected = 'Ė'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ę'; $result = mb_strtoupper($string); $expected = 'Ę'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ě'; $result = mb_strtoupper($string); $expected = 'Ě'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĝ'; $result = mb_strtoupper($string); $expected = 'Ĝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ğ'; $result = mb_strtoupper($string); $expected = 'Ğ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ġ'; $result = mb_strtoupper($string); $expected = 'Ġ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ģ'; $result = mb_strtoupper($string); $expected = 'Ģ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĥ'; $result = mb_strtoupper($string); $expected = 'Ĥ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ħ'; $result = mb_strtoupper($string); $expected = 'Ħ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĩ'; $result = mb_strtoupper($string); $expected = 'Ĩ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ī'; $result = mb_strtoupper($string); $expected = 'Ī'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭ'; $result = mb_strtoupper($string); $expected = 'Ĭ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'į'; $result = mb_strtoupper($string); $expected = 'Į'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ij'; $result = mb_strtoupper($string); $expected = 'IJ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĵ'; $result = mb_strtoupper($string); $expected = 'Ĵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ķ'; $result = mb_strtoupper($string); $expected = 'Ķ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĺ'; $result = mb_strtoupper($string); $expected = 'Ĺ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ļ'; $result = mb_strtoupper($string); $expected = 'Ļ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ľ'; $result = mb_strtoupper($string); $expected = 'Ľ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŀ'; $result = mb_strtoupper($string); $expected = 'Ŀ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ł'; $result = mb_strtoupper($string); $expected = 'Ł'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ń'; $result = mb_strtoupper($string); $expected = 'Ń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ņ'; $result = mb_strtoupper($string); $expected = 'Ņ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ň'; $result = mb_strtoupper($string); $expected = 'Ň'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŋ'; $result = mb_strtoupper($string); $expected = 'Ŋ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ō'; $result = mb_strtoupper($string); $expected = 'Ō'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŏ'; $result = mb_strtoupper($string); $expected = 'Ŏ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ő'; $result = mb_strtoupper($string); $expected = 'Ő'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'œ'; $result = mb_strtoupper($string); $expected = 'Œ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŕ'; $result = mb_strtoupper($string); $expected = 'Ŕ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŗ'; $result = mb_strtoupper($string); $expected = 'Ŗ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ř'; $result = mb_strtoupper($string); $expected = 'Ř'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ś'; $result = mb_strtoupper($string); $expected = 'Ś'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŝ'; $result = mb_strtoupper($string); $expected = 'Ŝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ş'; $result = mb_strtoupper($string); $expected = 'Ş'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'š'; $result = mb_strtoupper($string); $expected = 'Š'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ţ'; $result = mb_strtoupper($string); $expected = 'Ţ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ť'; $result = mb_strtoupper($string); $expected = 'Ť'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŧ'; $result = mb_strtoupper($string); $expected = 'Ŧ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ũ'; $result = mb_strtoupper($string); $expected = 'Ũ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ū'; $result = mb_strtoupper($string); $expected = 'Ū'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŭ'; $result = mb_strtoupper($string); $expected = 'Ŭ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ů'; $result = mb_strtoupper($string); $expected = 'Ů'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ű'; $result = mb_strtoupper($string); $expected = 'Ű'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ų'; $result = mb_strtoupper($string); $expected = 'Ų'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŵ'; $result = mb_strtoupper($string); $expected = 'Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŷ'; $result = mb_strtoupper($string); $expected = 'Ŷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ź'; $result = mb_strtoupper($string); $expected = 'Ź'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ż'; $result = mb_strtoupper($string); $expected = 'Ż'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ž'; $result = mb_strtoupper($string); $expected = 'Ž'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'āăąćĉċčďđēĕėęěĝğġģĥħĩīĭįijĵķĺļľŀłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž'; $result = mb_strtoupper($string); $expected = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $result = mb_strtoupper($string); $expected = 'ĤĒĹĻŎ, ŴŐŘĻĎ!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ἀι'; $result = mb_strtoupper($string); $expected = 'ἈΙ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ԁԃԅԇԉԋԍԏԐԒ'; $result = mb_strtoupper($string); $expected = 'ԀԂԄԆԈԊԌԎԐԒ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; $result = mb_strtoupper($string); $expected = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; $result = mb_strtoupper($string); $expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; $result = mb_strtoupper($string); $expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ωkå'; $result = mb_strtoupper($string); $expected = 'ΩKÅ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); /* mb_strtoupper does not work for these strings. @@ -7730,27 +7730,27 @@ mb_strtoupper does not work for these strings. $string = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; $result = mb_strtoupper($string); $expected = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; $result = mb_strtoupper($string); $expected = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; $result = mb_strtoupper($string); $expected = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; $result = mb_strtoupper($string); $expected = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); */ $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; $result = mb_strtoupper($string); $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -7763,547 +7763,547 @@ mb_strtoupper does not work for these strings. $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $result = Multibyte::strtoupper($string); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@'; $result = Multibyte::strtoupper($string); $expected = '!"#$%&\'()*+,-./0123456789:;<=>?@'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'à'; $result = Multibyte::strtoupper($string); $expected = 'À'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'á'; $result = Multibyte::strtoupper($string); $expected = 'Á'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'â'; $result = Multibyte::strtoupper($string); $expected = 'Â'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ã'; $result = Multibyte::strtoupper($string); $expected = 'Ã'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ä'; $result = Multibyte::strtoupper($string); $expected = 'Ä'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'å'; $result = Multibyte::strtoupper($string); $expected = 'Å'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'æ'; $result = Multibyte::strtoupper($string); $expected = 'Æ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ç'; $result = Multibyte::strtoupper($string); $expected = 'Ç'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'è'; $result = Multibyte::strtoupper($string); $expected = 'È'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'é'; $result = Multibyte::strtoupper($string); $expected = 'É'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ê'; $result = Multibyte::strtoupper($string); $expected = 'Ê'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ë'; $result = Multibyte::strtoupper($string); $expected = 'Ë'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ì'; $result = Multibyte::strtoupper($string); $expected = 'Ì'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'í'; $result = Multibyte::strtoupper($string); $expected = 'Í'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'î'; $result = Multibyte::strtoupper($string); $expected = 'Î'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ï'; $result = Multibyte::strtoupper($string); $expected = 'Ï'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ð'; $result = Multibyte::strtoupper($string); $expected = 'Ð'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ñ'; $result = Multibyte::strtoupper($string); $expected = 'Ñ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ò'; $result = Multibyte::strtoupper($string); $expected = 'Ò'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ó'; $result = Multibyte::strtoupper($string); $expected = 'Ó'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ô'; $result = Multibyte::strtoupper($string); $expected = 'Ô'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'õ'; $result = Multibyte::strtoupper($string); $expected = 'Õ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ö'; $result = Multibyte::strtoupper($string); $expected = 'Ö'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ø'; $result = Multibyte::strtoupper($string); $expected = 'Ø'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ù'; $result = Multibyte::strtoupper($string); $expected = 'Ù'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ú'; $result = Multibyte::strtoupper($string); $expected = 'Ú'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'û'; $result = Multibyte::strtoupper($string); $expected = 'Û'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ü'; $result = Multibyte::strtoupper($string); $expected = 'Ü'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ý'; $result = Multibyte::strtoupper($string); $expected = 'Ý'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'þ'; $result = Multibyte::strtoupper($string); $expected = 'Þ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ'; $result = Multibyte::strtoupper($string); $expected = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ā'; $result = Multibyte::strtoupper($string); $expected = 'Ā'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ă'; $result = Multibyte::strtoupper($string); $expected = 'Ă'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ą'; $result = Multibyte::strtoupper($string); $expected = 'Ą'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ć'; $result = Multibyte::strtoupper($string); $expected = 'Ć'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĉ'; $result = Multibyte::strtoupper($string); $expected = 'Ĉ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ċ'; $result = Multibyte::strtoupper($string); $expected = 'Ċ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'č'; $result = Multibyte::strtoupper($string); $expected = 'Č'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ď'; $result = Multibyte::strtoupper($string); $expected = 'Ď'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'đ'; $result = Multibyte::strtoupper($string); $expected = 'Đ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ē'; $result = Multibyte::strtoupper($string); $expected = 'Ē'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĕ'; $result = Multibyte::strtoupper($string); $expected = 'Ĕ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ė'; $result = Multibyte::strtoupper($string); $expected = 'Ė'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ę'; $result = Multibyte::strtoupper($string); $expected = 'Ę'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ě'; $result = Multibyte::strtoupper($string); $expected = 'Ě'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĝ'; $result = Multibyte::strtoupper($string); $expected = 'Ĝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ğ'; $result = Multibyte::strtoupper($string); $expected = 'Ğ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ġ'; $result = Multibyte::strtoupper($string); $expected = 'Ġ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ģ'; $result = Multibyte::strtoupper($string); $expected = 'Ģ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĥ'; $result = Multibyte::strtoupper($string); $expected = 'Ĥ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ħ'; $result = Multibyte::strtoupper($string); $expected = 'Ħ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĩ'; $result = Multibyte::strtoupper($string); $expected = 'Ĩ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ī'; $result = Multibyte::strtoupper($string); $expected = 'Ī'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭ'; $result = Multibyte::strtoupper($string); $expected = 'Ĭ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'į'; $result = Multibyte::strtoupper($string); $expected = 'Į'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ij'; $result = Multibyte::strtoupper($string); $expected = 'IJ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĵ'; $result = Multibyte::strtoupper($string); $expected = 'Ĵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ķ'; $result = Multibyte::strtoupper($string); $expected = 'Ķ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĺ'; $result = Multibyte::strtoupper($string); $expected = 'Ĺ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ļ'; $result = Multibyte::strtoupper($string); $expected = 'Ļ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ľ'; $result = Multibyte::strtoupper($string); $expected = 'Ľ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŀ'; $result = Multibyte::strtoupper($string); $expected = 'Ŀ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ł'; $result = Multibyte::strtoupper($string); $expected = 'Ł'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ń'; $result = Multibyte::strtoupper($string); $expected = 'Ń'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ņ'; $result = Multibyte::strtoupper($string); $expected = 'Ņ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ň'; $result = Multibyte::strtoupper($string); $expected = 'Ň'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŋ'; $result = Multibyte::strtoupper($string); $expected = 'Ŋ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ō'; $result = Multibyte::strtoupper($string); $expected = 'Ō'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŏ'; $result = Multibyte::strtoupper($string); $expected = 'Ŏ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ő'; $result = Multibyte::strtoupper($string); $expected = 'Ő'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'œ'; $result = Multibyte::strtoupper($string); $expected = 'Œ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŕ'; $result = Multibyte::strtoupper($string); $expected = 'Ŕ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŗ'; $result = Multibyte::strtoupper($string); $expected = 'Ŗ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ř'; $result = Multibyte::strtoupper($string); $expected = 'Ř'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ś'; $result = Multibyte::strtoupper($string); $expected = 'Ś'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŝ'; $result = Multibyte::strtoupper($string); $expected = 'Ŝ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ş'; $result = Multibyte::strtoupper($string); $expected = 'Ş'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'š'; $result = Multibyte::strtoupper($string); $expected = 'Š'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ţ'; $result = Multibyte::strtoupper($string); $expected = 'Ţ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ť'; $result = Multibyte::strtoupper($string); $expected = 'Ť'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŧ'; $result = Multibyte::strtoupper($string); $expected = 'Ŧ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ũ'; $result = Multibyte::strtoupper($string); $expected = 'Ũ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ū'; $result = Multibyte::strtoupper($string); $expected = 'Ū'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŭ'; $result = Multibyte::strtoupper($string); $expected = 'Ŭ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ů'; $result = Multibyte::strtoupper($string); $expected = 'Ů'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ű'; $result = Multibyte::strtoupper($string); $expected = 'Ű'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ų'; $result = Multibyte::strtoupper($string); $expected = 'Ų'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŵ'; $result = Multibyte::strtoupper($string); $expected = 'Ŵ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ŷ'; $result = Multibyte::strtoupper($string); $expected = 'Ŷ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ź'; $result = Multibyte::strtoupper($string); $expected = 'Ź'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ż'; $result = Multibyte::strtoupper($string); $expected = 'Ż'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ž'; $result = Multibyte::strtoupper($string); $expected = 'Ž'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'āăąćĉċčďđēĕėęěĝğġģĥħĩīĭįijĵķĺļľŀłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž'; $result = Multibyte::strtoupper($string); $expected = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $result = Multibyte::strtoupper($string); $expected = 'ĤĒĹĻŎ, ŴŐŘĻĎ!'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ἀι'; $result = mb_strtoupper($string); $expected = 'ἈΙ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ἀι'; $result = Multibyte::strtoupper($string); $expected = 'ἈΙ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ԁԃԅԇԉԋԍԏԐԒ'; $result = Multibyte::strtoupper($string); $expected = 'ԀԂԄԆԈԊԌԎԐԒ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև'; $result = Multibyte::strtoupper($string); $expected = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; $result = Multibyte::strtoupper($string); $expected = 'ႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; $result = Multibyte::strtoupper($string); $expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ωkåⅎ'; $result = Multibyte::strtoupper($string); $expected = 'ΩKÅℲ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ωkå'; $result = Multibyte::strtoupper($string); $expected = 'ΩKÅ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ'; $result = Multibyte::strtoupper($string); $expected = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ'; $result = Multibyte::strtoupper($string); $expected = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ'; $result = Multibyte::strtoupper($string); $expected = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ'; $result = Multibyte::strtoupper($string); $expected = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; $result = Multibyte::strtoupper($string); $expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -8317,247 +8317,247 @@ mb_strtoupper does not work for these strings. $find = 'F'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSFTUVWXYZ0F12345F6789'; $find = 'F'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÅÊËÌÍÎÏÐÑÒÓÔÅÕÖØÅÙÚÛÅÜÝÞ'; $find = 'Å'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÙÚÂÃÄÅÆÇÈÙÚÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞÙÚ'; $find = 'ÙÚ'; $result = mb_substr_count($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊÅËÌÍÎÏÐÑÒÓÔÕÅÖØÅÙÚÅÛÜÅÝÞÅ'; $find = 'Å'; $result = mb_substr_count($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĊĀĂĄĆĈĊČĎĐĒĔĖĊĘĚĜĞĠĢĤĦĨĪĬĮĊIJĴĶĹĻĽĿŁŃŅŇŊŌĊŎŐŒŔŖŘŚŜŞŠŢĊŤŦŨŪŬŮŰĊŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_substr_count($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĊĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅĊŇŊŌŎŐŒŔŖĊŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./012F34567F89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiFjklmnopqFrstuvwFxyz{|}~'; $find = 'F'; $result = mb_substr_count($string, $find); $expected = 6; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥µ¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁµÂõÄÅÆǵÈ'; $find = 'µ'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôÕÖõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉÕÖĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝÕÖĞğĠġĢģĤĥĦÕÖħĨĩĪīĬ'; $find = 'ÕÖ'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōĵĶķĸĹŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšĵĶķĸĹŢţŤťŦŧŨũŪūŬŭŮůŰűŲųĵĶķĸĹŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'ĵĶķĸĹ'; $result = mb_substr_count($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƸƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJƸNjnjǍǎǏǐǑǒǓƸǔǕǖǗǘǙǚƸǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƹƠơƢƣƤƥƦƧƨƩƹƪƫƬƭƮƯưƱƲƳƴƹƵƶƷƸƹƺƻƼƽƾƿǀǁǂƹǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'ƹ'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞʀɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʀʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʀʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʀʻʼ'; $find = 'ʀ'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЇЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = mb_substr_count($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСРТУФХЦЧШЩЪЫЬРЭЮЯабРвгдежзийклРмнопрстуфхцчшщъыь'; $find = 'Р'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСрТУФХЦЧШЩЪЫрЬЭЮЯабвгдежзийклмнопррстуфхцчшщъыь'; $find = 'р'; $result = mb_substr_count($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فنقكلنمنهونىينًٌٍَُ'; $find = 'ن'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✿✴✵✶✷✸✿✹✺✻✼✽✾✿❀❁❂❃❄❅❆✿❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = mb_substr_count($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺐⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺐⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⺐⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = mb_substr_count($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽤⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽤⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = mb_substr_count($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눺눻눼눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕눺눻눼뉖뉗뉘뉙뉚뉛뉜뉝눺눻눼뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눺눻눼'; $result = mb_substr_count($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺞﺟﺠﺡﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺞﺟﺠﺡﺆﺇﺞﺟﺠﺡﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞﺟﺠﺡ'; $result = mb_substr_count($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﻞﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻞﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻞﻸﻹﻺﻞﻻﻼ'; $find = 'ﻞ'; $result = mb_substr_count($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdkefghijklmnopqrstuvwxkyz'; $find = 'k'; $result = mb_substr_count($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abklmcdefghijklmnopqrstuvklmwxyz'; $find = 'klm'; $result = mb_substr_count($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdppefghijklmnoppqrstuvwxyz'; $find = 'ppe'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ĺļ'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = mb_substr_count($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rl'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ničiničiini'; $find = 'n'; $result = mb_substr_count($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moćimoćimoćmćioći'; $find = 'ći'; $result = mb_substr_count($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = mb_substr_count($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'H'; $result = mb_substr_count($string, $find); $expected = 0; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -8571,247 +8571,247 @@ mb_strtoupper does not work for these strings. $find = 'F'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ABCDEFGHIJKLMNOPQFRSFTUVWXYZ0F12345F6789'; $find = 'F'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÅÊËÌÍÎÏÐÑÒÓÔÅÕÖØÅÙÚÛÅÜÝÞ'; $find = 'Å'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÙÚÂÃÄÅÆÇÈÙÚÉÊËÌÍÎÏÐÑÒÓÔÕÖØÅÙÚÛÜÝÞÙÚ'; $find = 'ÙÚ'; $result = Multibyte::substrCount($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊÅËÌÍÎÏÐÑÒÓÔÕÅÖØÅÙÚÅÛÜÅÝÞÅ'; $find = 'Å'; $result = Multibyte::substrCount($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĊĀĂĄĆĈĊČĎĐĒĔĖĊĘĚĜĞĠĢĤĦĨĪĬĮĊIJĴĶĹĻĽĿŁŃŅŇŊŌĊŎŐŒŔŖŘŚŜŞŠŢĊŤŦŨŪŬŮŰĊŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::substrCount($string, $find); $expected = 7; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĊĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁĊŃŅĊŇŊŌŎŐŒŔŖĊŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./012F34567F89:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiFjklmnopqFrstuvwFxyz{|}~'; $find = 'F'; $result = Multibyte::substrCount($string, $find); $expected = 6; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥µ¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁµÂõÄÅÆǵÈ'; $find = 'µ'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôÕÖõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉÕÖĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝÕÖĞğĠġĢģĤĥĦÕÖħĨĩĪīĬ'; $find = 'ÕÖ'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōĵĶķĸĹŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšĵĶķĸĹŢţŤťŦŧŨũŪūŬŭŮůŰűŲųĵĶķĸĹŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $find = 'ĵĶķĸĹ'; $result = Multibyte::substrCount($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƸƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJƸNjnjǍǎǏǐǑǒǓƸǔǕǖǗǘǙǚƸǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'Ƹ'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƹƠơƢƣƤƥƦƧƨƩƹƪƫƬƭƮƯưƱƲƳƴƹƵƶƷƸƹƺƻƼƽƾƿǀǁǂƹǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $find = 'ƹ'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞʀɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʀʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʀʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʀʻʼ'; $find = 'ʀ'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЇЎЏАБВГДЕЖЗИЙКЛ'; $find = 'Ї'; $result = Multibyte::substrCount($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСРТУФХЦЧШЩЪЫЬРЭЮЯабРвгдежзийклРмнопрстуфхцчшщъыь'; $find = 'Р'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСрТУФХЦЧШЩЪЫрЬЭЮЯабвгдежзийклмнопррстуфхцчшщъыь'; $find = 'р'; $result = Multibyte::substrCount($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فنقكلنمنهونىينًٌٍَُ'; $find = 'ن'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✿✴✵✶✷✸✿✹✺✻✼✽✾✿❀❁❂❃❄❅❆✿❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $find = '✿'; $result = Multibyte::substrCount($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺐⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺐⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⺐⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $find = '⺐'; $result = Multibyte::substrCount($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽤⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽤⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $find = '⽤'; $result = Multibyte::substrCount($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눺눻눼눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕눺눻눼뉖뉗뉘뉙뉚뉛뉜뉝눺눻눼뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $find = '눺눻눼'; $result = Multibyte::substrCount($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺞﺟﺠﺡﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺞﺟﺠﺡﺆﺇﺞﺟﺠﺡﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $find = 'ﺞﺟﺠﺡ'; $result = Multibyte::substrCount($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﻞﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻞﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻞﻸﻹﻺﻞﻻﻼ'; $find = 'ﻞ'; $result = Multibyte::substrCount($string, $find); $expected = 5; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdkefghijklmnopqrstuvwxkyz'; $find = 'k'; $result = Multibyte::substrCount($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abklmcdefghijklmnopqrstuvklmwxyz'; $find = 'klm'; $result = Multibyte::substrCount($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdppefghijklmnoppqrstuvwxyz'; $find = 'ppe'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $find = 'ア'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $find = 'ハ'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ő'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'ĺļ'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'o'; $result = Multibyte::substrCount($string, $find); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $find = 'rl'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $find = 'n'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ničiničiini'; $find = 'n'; $result = Multibyte::substrCount($string, $find); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $find = 'ć'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moćimoćimoćmćioći'; $find = 'ći'; $result = Multibyte::substrCount($string, $find); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $find = 'ž'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $find = '设'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $find = '周'; $result = Multibyte::substrCount($string, $find); $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $find = 'H'; $result = Multibyte::substrCount($string, $find); $expected = 0; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -8824,153 +8824,153 @@ mb_strtoupper does not work for these strings. $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $result = mb_substr($string, 4, 7); $expected = 'EFGHIJK'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $result = mb_substr($string, 4, 7); $expected = 'ÄÅÆÇÈÉÊ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = mb_substr($string, 4, 7); $expected = 'ĈĊČĎĐĒĔ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $result = mb_substr($string, 4, 7); $expected = '%&\'()*+'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $result = mb_substr($string, 4); $expected = '¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $result = mb_substr($string, 4, 7); $expected = 'ÍÎÏÐÑÒÓ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $result = mb_substr($string, 4, 7); $expected = 'ıIJijĴĵĶķ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $result = mb_substr($string, 25); $expected = 'ƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $result = mb_substr($string, 3); $expected = 'ɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $result = mb_substr($string, 3); $expected = 'ЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $result = mb_substr($string, 3, 16); $expected = 'ПРСТУФХЦЧШЩЪЫЬЭЮ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $result = mb_substr($string, 3, 6); $expected = 'لمنهوى'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $result = mb_substr($string, 6, 14); $expected = '✶✷✸✹✺✻✼✽✾✿❀❁❂❃'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $result = mb_substr($string, 8, 13); $expected = '⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $result = mb_substr($string, 12, 24); $expected = '⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $result = mb_substr($string, 12, 24); $expected = '눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $result = mb_substr($string, 12); $expected = 'ﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $result = mb_substr($string, 24, 12); $expected = 'ﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $result = mb_substr($string, 11, 2); $expected = 'lm'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $result = mb_substr($string, 7, 11); $expected = 'ィゥェォャュョッーアイ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $result = mb_substr($string, 13, 13); $expected = 'ニヌネノハヒフヘホマミムメ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $result = mb_substr($string, 3, 4); $expected = 'ļŏ, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $result = mb_substr($string, 3, 4); $expected = 'lo, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $result = mb_substr($string, 3); $expected = 'i'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $result = mb_substr($string, 1); $expected = 'oći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $result = mb_substr($string, 0, 2); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $result = mb_substr($string, 3, 3); $expected = '设为首'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = mb_substr($string, 0, 1); $expected = '一'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = mb_substr($string, 6); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = mb_substr($string, 0); $expected = '一二三周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -8983,153 +8983,153 @@ mb_strtoupper does not work for these strings. $string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; $result = Multibyte::substr($string, 4, 7); $expected = 'EFGHIJK'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'; $result = Multibyte::substr($string, 4, 7); $expected = 'ÄÅÆÇÈÉÊ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $find = 'Ċ'; $result = Multibyte::substr($string, 4, 7); $expected = 'ĈĊČĎĐĒĔ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $result = Multibyte::substr($string, 4, 7); $expected = '%&\'()*+'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $result = Multibyte::substr($string, 4); $expected = '¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $result = Multibyte::substr($string, 4, 7); $expected = 'ÍÎÏÐÑÒÓ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $result = Multibyte::substr($string, 4, 7); $expected = 'ıIJijĴĵĶķ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $result = Multibyte::substr($string, 25); $expected = 'ƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $result = Multibyte::substr($string, 3); $expected = 'ɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $result = Multibyte::substr($string, 3); $expected = 'ЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $result = Multibyte::substr($string, 3, 16); $expected = 'ПРСТУФХЦЧШЩЪЫЬЭЮ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $result = Multibyte::substr($string, 3, 6); $expected = 'لمنهوى'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $result = Multibyte::substr($string, 6, 14); $expected = '✶✷✸✹✺✻✼✽✾✿❀❁❂❃'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $result = Multibyte::substr($string, 8, 13); $expected = '⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $result = Multibyte::substr($string, 12, 24); $expected = '⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $result = Multibyte::substr($string, 12, 24); $expected = '눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $result = Multibyte::substr($string, 12); $expected = 'ﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $result = Multibyte::substr($string, 24, 12); $expected = 'ﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $result = Multibyte::substr($string, 11, 2); $expected = 'lm'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $result = Multibyte::substr($string, 7, 11); $expected = 'ィゥェォャュョッーアイ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $result = Multibyte::substr($string, 13, 13); $expected = 'ニヌネノハヒフヘホマミムメ'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $result = Multibyte::substr($string, 3, 4); $expected = 'ļŏ, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $result = Multibyte::substr($string, 3, 4); $expected = 'lo, '; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'čini'; $result = Multibyte::substr($string, 3); $expected = 'i'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $result = Multibyte::substr($string, 1); $expected = 'oći'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $result = Multibyte::substr($string, 0, 2); $expected = 'dr'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $result = Multibyte::substr($string, 3, 3); $expected = '设为首'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = Multibyte::substr($string, 0, 1); $expected = '一'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = Multibyte::substr($string, 6); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = Multibyte::substr($string, 0); $expected = '一二三周永龍'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -9147,31 +9147,31 @@ mb_strtoupper does not work for these strings. $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?w4DDgcOCw4PDhMOFw4bDh8OIw4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5U=?=' . "\r\n" . ' =?UTF-8?B?w5bDmMOZw5rDm8Ocw53Dng==?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Multibyte::mimeEncode($string, null, "\n"); $expected = '=?UTF-8?B?w4DDgcOCw4PDhMOFw4bDh8OIw4nDisOLw4zDjcOOw4/DkMORw5LDk8OUw5U=?=' . "\n" . ' =?UTF-8?B?w5bDmMOZw5rDm8Ocw53Dng==?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŹŻŽ'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?xIDEgsSExIbEiMSKxIzEjsSQxJLElMSWxJjEmsScxJ7EoMSixKTEpsSoxKo=?=' . "\r\n" . ' =?UTF-8?B?xKzErsSyxLTEtsS5xLvEvcS/xYHFg8WFxYfFisWMxY7FkMWSxZTFlsWYxZo=?=' . "\r\n" . ' =?UTF-8?B?xZzFnsWgxaLFpMWmxajFqsWsxa7FsMWyxbTFtsW5xbvFvQ==?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?ISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xN?=' . "\r\n" . ' =?UTF-8?B?Tk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6?=' . "\r\n" . ' =?UTF-8?B?e3x9fg==?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?wqHCosKjwqTCpcKmwqfCqMKpwqrCq8Kswq3CrsKvwrDCscKywrPCtMK1wrY=?=' . "\r\n" . ' =?UTF-8?B?wrfCuMK5wrrCu8K8wr3CvsK/w4DDgcOCw4PDhMOFw4bDh8OI?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ'; $result = Multibyte::mimeEncode($string); @@ -9180,7 +9180,7 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?w7XDtsO3w7jDucO6w7vDvMO9w77Dv8SAxIHEgsSDxITEhcSGxIfEiMSJxIo=?=' . "\r\n" . ' =?UTF-8?B?xIvEjMSNxI7Ej8SQxJHEksSTxJTElcSWxJfEmMSZxJrEm8ScxJ3EnsSfxKA=?=' . "\r\n" . ' =?UTF-8?B?xKHEosSjxKTEpcSmxKfEqMSpxKrEq8Ss?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ'; $result = Multibyte::mimeEncode($string); @@ -9189,7 +9189,7 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?xZnFmsWbxZzFncWexZ/FoMWhxaLFo8WkxaXFpsWnxajFqcWqxavFrMWtxa4=?=' . "\r\n" . ' =?UTF-8?B?xa/FsMWxxbLFs8W0xbXFtsW3xbjFucW6xbvFvMW9xb7Fv8aAxoHGgsaDxoQ=?=' . "\r\n" . ' =?UTF-8?B?xoXGhsaHxojGicaKxovGjMaNxo7Gj8aQ?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ'; $result = Multibyte::mimeEncode($string); @@ -9198,7 +9198,7 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?xr3Gvsa/x4DHgceCx4PHhMeFx4bHh8eIx4nHiseLx4zHjceOx4/HkMeRx5I=?=' . "\r\n" . ' =?UTF-8?B?x5PHlMeVx5bHl8eYx5nHmsebx5zHnceex5/HoMehx6LHo8ekx6XHpsenx6g=?=' . "\r\n" . ' =?UTF-8?B?x6nHqserx6zHrceux6/HsMexx7LHs8e0?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ'; $result = Multibyte::mimeEncode($string); @@ -9207,25 +9207,25 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?yoXKhsqHyojKicqKyovKjMqNyo7Kj8qQypHKksqTypTKlcqWypfKmMqZypo=?=' . "\r\n" . ' =?UTF-8?B?ypvKnMqdyp7Kn8qgyqHKosqjyqTKpcqmyqfKqMqpyqrKq8qsyq3KrsqvyrA=?=' . "\r\n" . ' =?UTF-8?B?yrHKssqzyrTKtcq2yrfKuMq5yrrKu8q8?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?0IDQgdCC0IPQhNCF0IbQh9CI0InQitCL0IzQjdCO0I/QkNCR0JLQk9CU0JU=?=' . "\r\n" . ' =?UTF-8?B?0JbQl9CY0JnQmtCb?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?0JzQndCe0J/QoNCh0KLQo9Ck0KXQptCn0KjQqdCq0KvQrNCt0K7Qr9Cw0LE=?=' . "\r\n" . ' =?UTF-8?B?0LLQs9C00LXQttC30LjQudC60LvQvNC90L7Qv9GA0YHRgtGD0YTRhdGG0Yc=?=' . "\r\n" . ' =?UTF-8?B?0YjRidGK0YvRjA==?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'فقكلمنهوىيًٌٍَُ'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?2YHZgtmD2YTZhdmG2YfZiNmJ2YrZi9mM2Y3ZjtmP?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞'; $result = Multibyte::mimeEncode($string); @@ -9233,7 +9233,7 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?4py/4p2A4p2B4p2C4p2D4p2E4p2F4p2G4p2H4p2I4p2J4p2K4p2L4p2M4p2N?=' . "\r\n" . ' =?UTF-8?B?4p2O4p2P4p2Q4p2R4p2S4p2T4p2U4p2V4p2W4p2X4p2Y4p2Z4p2a4p2b4p2c?=' . "\r\n" . ' =?UTF-8?B?4p2d4p2e?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠'; $result = Multibyte::mimeEncode($string); @@ -9244,7 +9244,7 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?4rq94rq+4rq/4ruA4ruB4ruC4ruD4ruE4ruF4ruG4ruH4ruI4ruJ4ruK4ruL?=' . "\r\n" . ' =?UTF-8?B?4ruM4ruN4ruO4ruP4ruQ4ruR4ruS4ruT4ruU4ruV4ruW4ruX4ruY4ruZ4rua?=' . "\r\n" . ' =?UTF-8?B?4rub4ruc4rud4rue4ruf4rug?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '⽅⽆⽇⽈⽉⽊⽋⽌⽍⽎⽏⽐⽑⽒⽓⽔⽕⽖⽗⽘⽙⽚⽛⽜⽝⽞⽟⽠⽡⽢⽣⽤⽥⽦⽧⽨⽩⽪⽫⽬⽭⽮⽯⽰⽱⽲⽳⽴⽵⽶⽷⽸⽹⽺⽻⽼⽽⽾⽿'; $result = Multibyte::mimeEncode($string); @@ -9252,7 +9252,7 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?4r2U4r2V4r2W4r2X4r2Y4r2Z4r2a4r2b4r2c4r2d4r2e4r2f4r2g4r2h4r2i?=' . "\r\n" . ' =?UTF-8?B?4r2j4r2k4r2l4r2m4r2n4r2o4r2p4r2q4r2r4r2s4r2t4r2u4r2v4r2w4r2x?=' . "\r\n" . ' =?UTF-8?B?4r2y4r2z4r204r214r224r234r244r254r264r274r284r294r2+4r2/?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '눡눢눣눤눥눦눧눨눩눪눫눬눭눮눯눰눱눲눳눴눵눶눷눸눹눺눻눼눽눾눿뉀뉁뉂뉃뉄뉅뉆뉇뉈뉉뉊뉋뉌뉍뉎뉏뉐뉑뉒뉓뉔뉕뉖뉗뉘뉙뉚뉛뉜뉝뉞뉟뉠뉡뉢뉣뉤뉥뉦뉧뉨뉩뉪뉫뉬뉭뉮뉯뉰뉱뉲뉳뉴뉵뉶뉷뉸뉹뉺뉻뉼뉽뉾뉿늀늁늂늃늄'; $result = Multibyte::mimeEncode($string); @@ -9263,7 +9263,7 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?64md64me64mf64mg64mh64mi64mj64mk64ml64mm64mn64mo64mp64mq64mr?=' . "\r\n" . ' =?UTF-8?B?64ms64mt64mu64mv64mw64mx64my64mz64m064m164m264m364m464m564m6?=' . "\r\n" . ' =?UTF-8?B?64m764m864m964m+64m/64qA64qB64qC64qD64qE?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﹰﹱﹲﹳﹴ﹵ﹶﹷﹸﹹﹺﹻﹼﹽﹾﹿﺀﺁﺂﺃﺄﺅﺆﺇﺈﺉﺊﺋﺌﺍﺎﺏﺐﺑﺒﺓﺔﺕﺖﺗﺘﺙﺚﺛﺜﺝﺞﺟﺠﺡﺢﺣﺤﺥﺦﺧﺨﺩﺪﺫﺬﺭﺮﺯﺰ'; $result = Multibyte::mimeEncode($string); @@ -9272,7 +9272,7 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?77qO77qP77qQ77qR77qS77qT77qU77qV77qW77qX77qY77qZ77qa77qb77qc?=' . "\r\n" . ' =?UTF-8?B?77qd77qe77qf77qg77qh77qi77qj77qk77ql77qm77qn77qo77qp77qq77qr?=' . "\r\n" . ' =?UTF-8?B?77qs77qt77qu77qv77qw?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ﺱﺲﺳﺴﺵﺶﺷﺸﺹﺺﺻﺼﺽﺾﺿﻀﻁﻂﻃﻄﻅﻆﻇﻈﻉﻊﻋﻌﻍﻎﻏﻐﻑﻒﻓﻔﻕﻖﻗﻘﻙﻚﻛﻜﻝﻞﻟﻠﻡﻢﻣﻤﻥﻦﻧﻨﻩﻪﻫﻬﻭﻮﻯﻰﻱﻲﻳﻴﻵﻶﻷﻸﻹﻺﻻﻼ'; $result = Multibyte::mimeEncode($string); @@ -9282,31 +9282,31 @@ mb_strtoupper does not work for these strings. ' =?UTF-8?B?77ue77uf77ug77uh77ui77uj77uk77ul77um77un77uo77up77uq77ur77us?=' . "\r\n" . ' =?UTF-8?B?77ut77uu77uv77uw77ux77uy77uz77u077u177u277u377u477u577u677u7?=' . "\r\n" . ' =?UTF-8?B?77u8?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'abcdefghijklmnopqrstuvwxyz'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?772B772C772D772E772F772G772H772I772J772K772L772M772N772O772P?=' . "\r\n" . ' =?UTF-8?B?772Q772R772S772T772U772V772W772X772Y772Z772a?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?772h772i772j772k772l772m772n772o772p772q772r772s772t772u772v?=' . "\r\n" . ' =?UTF-8?B?772w772x772y772z77207721772277237724?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'ケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?77257726772777287729772+772/776A776B776C776D776E776F776G776H?=' . "\r\n" . ' =?UTF-8?B?776I776J776K776L776M776N776O776P776Q776R776S776T776U776V776W?=' . "\r\n" . ' =?UTF-8?B?776X776Y776Z776a776b776c776d776e?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Ĥēĺļŏ, Ŵőřļď!'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?xKTEk8S6xLzFjywgxbTFkcWZxLzEjyE=?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Hello, World!'; $result = Multibyte::mimeEncode($string); @@ -9315,26 +9315,26 @@ mb_strtoupper does not work for these strings. $string = 'čini'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?xI1pbmk=?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'moći'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?bW/Eh2k=?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'državni'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?ZHLFvmF2bmk=?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '把百度设为首页'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?5oqK55m+5bqm6K6+5Li66aaW6aG1?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '一二三周永龍'; $result = Multibyte::mimeEncode($string); $expected = '=?UTF-8?B?5LiA5LqM5LiJ5ZGo5rC46b6N?='; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php index 0b60115ef..c423f979e 100644 --- a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php @@ -35,7 +35,7 @@ class ContainableBehaviorTest extends CakeTestCase { * @access public */ public $fixtures = array( - 'core.article', 'core.article_featured', 'core.article_featureds_tags', + 'core.article', 'core.article_featured', 'core.article_featureds_tags', 'core.articles_tag', 'core.attachment', 'core.category', 'core.comment', 'core.featured', 'core.tag', 'core.user' ); @@ -131,7 +131,7 @@ class ContainableBehaviorTest extends CakeTestCase { $result = Set::extract('/Comment/keep', $r); $this->assertEqual(array_shift($result), array('keep' => array('User' => array()))); - + $result = Set::extract('/Article/keep', $r); $this->assertEqual(array_shift($result), array('keep' => array('Comment' => array()))); @@ -273,7 +273,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'published' => 'Y', 'created' => '2007-03-18 10:43:23', 'updated' => '2007-03-18 10:45:31' )) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -317,7 +317,7 @@ class ContainableBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article->contain('User', 'Comment'); $result = $this->Article->find('all', array('recursive' => 1)); @@ -382,7 +382,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Comment' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -425,7 +425,7 @@ class ContainableBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('all', array('contain' => array('User', 'Comment'))); $expected = array( @@ -489,7 +489,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Comment' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -574,7 +574,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Comment' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article->contain(array('User' => 'ArticleFeatured')); $result = $this->Article->find('all', array('recursive' => 2)); @@ -636,7 +636,7 @@ class ContainableBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article->contain(array('User' => array('ArticleFeatured', 'Comment'))); $result = $this->Article->find('all', array('recursive' => 2)); @@ -727,7 +727,7 @@ class ContainableBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article->contain(array('User' => array('ArticleFeatured')), 'Tag', array('Comment' => 'Attachment')); $result = $this->Article->find('all', array('recursive' => 2)); @@ -836,7 +836,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Tag' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -920,7 +920,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Comment' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('all', array('contain' => array('User' => 'ArticleFeatured'))); $expected = array( @@ -981,7 +981,7 @@ class ContainableBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('all', array('contain' => array('User' => array('ArticleFeatured', 'Comment')))); $expected = array( @@ -1071,7 +1071,7 @@ class ContainableBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('all', array('contain' => array('User' => 'ArticleFeatured', 'Tag', 'Comment' => 'Attachment'))); $expected = array( @@ -1179,7 +1179,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Tag' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1252,7 +1252,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->User->contain(array('ArticleFeatured' => array('Featured' => 'Category', 'Comment' => array('Article', 'Attachment')))); $result = $this->User->find('all', array('recursive' => 3)); @@ -1379,7 +1379,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->User->contain(array('ArticleFeatured' => array('Featured' => 'Category', 'Comment' => 'Attachment'), 'Article')); $result = $this->User->find('all', array('recursive' => 3)); @@ -1500,7 +1500,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1572,7 +1572,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->User->find('all', array('contain' => array('ArticleFeatured' => array('Featured' => 'Category', 'Comment' => array('Article', 'Attachment'))))); $expected = array( @@ -1698,7 +1698,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->User->find('all', array('contain' => array('ArticleFeatured' => array('Featured' => 'Category', 'Comment' => 'Attachment'), 'Article'))); $expected = array( @@ -1818,7 +1818,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1888,7 +1888,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $r = $this->User->find('all', array('contain' => array( 'ArticleFeatured' => array( @@ -1994,7 +1994,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $orders = array( 'title DESC', 'title DESC, published DESC', @@ -2064,7 +2064,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } @@ -2138,7 +2138,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->User->resetBindings(); @@ -2267,7 +2267,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->User->resetBindings(); @@ -2390,7 +2390,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2462,7 +2462,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->__assertBindings($this->User, array('hasMany' => array('ArticleFeatured'))); $this->__assertBindings($this->User->ArticleFeatured, array('hasOne' => array('Featured'))); @@ -2599,7 +2599,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->__assertBindings($this->User, array('hasMany' => array('ArticleFeatured'))); $this->__assertBindings($this->User->ArticleFeatured, array('hasOne' => array('Featured'), 'hasMany' => array('Comment'))); @@ -2736,7 +2736,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->__assertBindings($this->User, array('hasMany' => array('ArticleFeatured'))); $this->__assertBindings($this->User->ArticleFeatured, array('hasOne' => array('Featured'), 'hasMany' => array('Comment'))); @@ -2867,7 +2867,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'ArticleFeatured' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->__assertBindings($this->User, array('hasMany' => array('Article', 'ArticleFeatured'))); $this->__assertBindings($this->User->Article); @@ -2899,7 +2899,7 @@ class ContainableBehaviorTest extends CakeTestCase { array('Article' => array('title' => 'Second Article'), 'User' => array('user' => 'larry', 'id' => 3)), array('Article' => array('title' => 'Third Article'), 'User' => array('user' => 'mariano', 'id' => 1)), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('all', array( 'contain' => array('User(id, user)'), @@ -2910,7 +2910,7 @@ class ContainableBehaviorTest extends CakeTestCase { array('Article' => array('title' => 'Second Article'), 'User' => array('user' => 'larry', 'id' => 3)), array('Article' => array('title' => 'Third Article'), 'User' => array('user' => 'mariano', 'id' => 1)), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('all', array( 'contain' => array( @@ -2952,7 +2952,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Comment' => array() ), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3019,7 +3019,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Tag' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article->contain(array('User(id,user)', 'Tag' => array('fields' => array('tag', 'created')))); $result = $this->Article->find('all', array('fields' => array('title'))); @@ -3046,7 +3046,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Tag' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('all', array( 'fields' => array('title'), @@ -3075,7 +3075,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Tag' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article->contain(array( 'User(id,user)', @@ -3102,7 +3102,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'Tag' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertTrue(empty($this->User->Article->hasAndBelongsToMany['Tag']['conditions'])); @@ -3136,15 +3136,15 @@ class ContainableBehaviorTest extends CakeTestCase { function testOtherFinds() { $result = $this->Article->find('count'); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('count', array('conditions' => array('Article.id >' => '1'))); $expected = 2; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('count', array('contain' => array())); $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article->contain(array('User(id,user)', 'Tag' => array('fields' => array('tag', 'created'), 'conditions' => array('created >=' => '2007-03-18 12:24')))); $result = $this->Article->find('first', array('fields' => array('title'))); @@ -3153,7 +3153,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'User' => array('id' => 1, 'user' => 'mariano'), 'Tag' => array(array('tag' => 'tag2', 'created' => '2007-03-18 12:24:23')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article->contain(array('User(id,user)', 'Tag' => array('fields' => array('tag', 'created')))); $result = $this->Article->find('first', array('fields' => array('title'))); @@ -3165,7 +3165,7 @@ class ContainableBehaviorTest extends CakeTestCase { array('tag' => 'tag2', 'created' => '2007-03-18 12:24:23') ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('first', array( 'fields' => array('title'), @@ -3177,7 +3177,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'User' => array('id' => 1, 'user' => 'mariano'), 'Tag' => array() ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('list', array( 'contain' => array('User(id,user)'), @@ -3188,7 +3188,7 @@ class ContainableBehaviorTest extends CakeTestCase { 2 => 'Second Article', 3 => 'Third Article' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3248,7 +3248,7 @@ class ContainableBehaviorTest extends CakeTestCase { array('comment' => 'Fourth Comment for First Article', 'article_id' => 1) ) )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('all', array('fields' => array('title', 'User.id', 'User.user'), 'limit' => 1, 'page' => 2, 'order' => 'Article.id ASC')); $expected = array(array( @@ -3259,7 +3259,7 @@ class ContainableBehaviorTest extends CakeTestCase { array('comment' => 'Second Comment for Second Article', 'article_id' => 2) ) )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Article->find('all', array('fields' => array('title', 'User.id', 'User.user'), 'limit' => 1, 'page' => 3, 'order' => 'Article.id ASC')); $expected = array(array( @@ -3267,7 +3267,7 @@ class ContainableBehaviorTest extends CakeTestCase { 'User' => array('id' => 1, 'user' => 'mariano'), 'Comment' => array() )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article->contain(false, array('User' => array('fields' => 'user'), 'Comment')); $result = $this->Article->find('all'); diff --git a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php index cae244644..e7e46a8ed 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php @@ -107,7 +107,7 @@ class TranslateBehaviorTest extends CakeTestCase { $result = $TestModel->read(null, 1); $expected = array('TranslatedItem' => array('id' => 1, 'slug' => 'first_translated')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('fields' => array('slug'))); $expected = array( @@ -115,7 +115,7 @@ class TranslateBehaviorTest extends CakeTestCase { array('TranslatedItem' => array('slug' => 'second_translated')), array('TranslatedItem' => array('slug' => 'third_translated')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -147,7 +147,7 @@ class TranslateBehaviorTest extends CakeTestCase { array('id' => 6, 'locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'content', 'content' => 'Obsah #1') ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->hasMany['Title']['fields'] = $TestModel->hasMany['Content']['fields'] = array('content'); $TestModel->hasMany['Title']['conditions']['locale'] = $TestModel->hasMany['Content']['conditions']['locale'] = 'eng'; @@ -170,7 +170,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'Content' => array(array('foreign_key' => 3, 'content' => 'Content #3')) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -195,7 +195,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'content' => 'Content #1' ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all'); $expected = array( @@ -227,7 +227,7 @@ class TranslateBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -253,7 +253,7 @@ class TranslateBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('conditions' => "TranslatedItem.slug = 'first_translated'")); $expected = array( @@ -267,7 +267,7 @@ class TranslateBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -305,7 +305,7 @@ class TranslateBehaviorTest extends CakeTestCase { array('id' => 6, 'locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'content', 'content' => 'Obsah #1') ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->hasMany['Title']['fields'] = $TestModel->hasMany['Content']['fields'] = array('content'); $TestModel->hasMany['Title']['conditions']['locale'] = $TestModel->hasMany['Content']['conditions']['locale'] = 'eng'; @@ -328,7 +328,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'Content' => array(array('foreign_key' => 3, 'content' => 'Content #3')) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -354,7 +354,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'content' => 'Inhalt #1' ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('fields' => array('slug', 'title', 'content'))); $expected = array( @@ -384,7 +384,7 @@ class TranslateBehaviorTest extends CakeTestCase { ) ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** @@ -412,7 +412,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'content' => '' ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -429,7 +429,7 @@ class TranslateBehaviorTest extends CakeTestCase { $TestModel->displayField = 'title'; $result = $TestModel->find('list', array('recursive' => 1)); $expected = array(1 => 'Titel #1', 2 => 'Titel #2', 3 => 'Titel #3'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // MSSQL trigger an error and stops the page even if the debug = 0 if ($this->db instanceof Mssql) { @@ -446,7 +446,7 @@ class TranslateBehaviorTest extends CakeTestCase { $result = $TestModel->find('list', array('recursive' => 1, 'callbacks' => 'before')); $expected = array(1 => null, 2 => null, 3 => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -466,10 +466,10 @@ class TranslateBehaviorTest extends CakeTestCase { array('TranslatedItem' => array('slug' => 'second_translated', 'locale' => 'eng', 'content' => 'Content #2')), array('TranslatedItem' => array('slug' => 'third_translated', 'locale' => 'eng', 'content' => 'Content #3')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('fields' => array('TranslatedItem.slug', 'content'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->locale = array('eng', 'deu', 'cze'); $delete = array(array('locale' => 'deu'), array('field' => 'content', 'locale' => 'eng')); @@ -482,7 +482,7 @@ class TranslateBehaviorTest extends CakeTestCase { array('TranslatedItem' => array('locale' => 'eng', 'title' => 'Title #2', 'content' => 'Obsah #2')), array('TranslatedItem' => array('locale' => 'eng', 'title' => 'Title #3', 'content' => 'Obsah #3')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -501,7 +501,7 @@ class TranslateBehaviorTest extends CakeTestCase { $TestModel->save(); $result = $TestModel->read(); $expected = array('TranslatedItem' => array_merge($data, array('id' => $TestModel->id, 'locale' => 'spa'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -524,7 +524,7 @@ class TranslateBehaviorTest extends CakeTestCase { $TestModel->save(); $result = $TestModel->read(null, $id); $expected = array('TranslatedItem' => array_merge($oldData, $newData, array('locale' => 'spa'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -563,7 +563,7 @@ class TranslateBehaviorTest extends CakeTestCase { array('id' => 20, 'locale' => 'spa', 'model' => 'TranslatedItem', 'foreign_key' => 4, 'field' => 'content', 'content' => 'Nuevo contenido') ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -603,7 +603,7 @@ class TranslateBehaviorTest extends CakeTestCase { array('id' => 6, 'locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'content', 'content' => 'Novy Obsah #1') ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->unbindTranslation($translations); $TestModel->bindTranslation(array('title', 'content'), false); @@ -648,7 +648,7 @@ class TranslateBehaviorTest extends CakeTestCase { array('id' => 6, 'locale' => 'cze', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'content', 'content' => 'Upraveny obsah #1') ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -701,12 +701,12 @@ class TranslateBehaviorTest extends CakeTestCase { $result = array_keys($TestModel->hasMany); $expected = array('Title', 'Content'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->Behaviors->detach('Translate'); $result = array_keys($TestModel->hasMany); $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = isset($TestModel->Behaviors->Translate); $this->assertFalse($result); @@ -720,7 +720,7 @@ class TranslateBehaviorTest extends CakeTestCase { $TestModel->Behaviors->attach('Translate', array('title' => 'Title', 'content' => 'Content')); $result = array_keys($TestModel->hasMany); $expected = array('Title', 'Content'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = isset($TestModel->Behaviors->Translate); $this->assertTrue($result); @@ -755,7 +755,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'content' => 'Another Content #1' ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -791,7 +791,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'updated' => '2007-03-17 01:18:31' ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('recursive' => -1)); $expected = array( @@ -832,7 +832,7 @@ class TranslateBehaviorTest extends CakeTestCase { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertEqual($TestModel->recursive, $recursive); $TestModel->recursive = -1; @@ -849,7 +849,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'body' => 'Body (eng) #1' ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * testTranslateTableWithPrefix method @@ -870,7 +870,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'content' => 'Content #1', 'title' => 'Title #1' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php index 2c8bbd8a5..3ac454378 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php @@ -69,7 +69,7 @@ class TreeBehaviorAfterTest extends CakeTestCase { $expected = array('AfterTree' => array('name' => 'Six and One Half Changed in AfterTree::afterSave() but not in database', 'parent_id' => 6, 'lft' => 11, 'rght' => 12)); $result = $this->Tree->save(array('AfterTree' => array('name' => 'Six and One Half', 'parent_id' => 6))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = array('AfterTree' => array('name' => 'Six and One Half', 'parent_id' => 6, 'lft' => 11, 'rght' => 12, 'id' => 8)); $result = $this->Tree->find('all'); diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php index c83e7b6cd..8793565dd 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php @@ -292,7 +292,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $this->Tree->save(array($modelClass => array('name' => 'testAddOrphan', $parentField => null))); $result = $this->Tree->find('first', array('fields' => array('name', $parentField), 'order' => $modelClass . '.' . $leftField . ' desc')); $expected = array($modelClass => array('name' => 'testAddOrphan', $parentField => null)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $validTree = $this->Tree->verify(); $this->assertIdentical($validTree, true); @@ -315,7 +315,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $this->Tree->create(); $result = $this->Tree->save(array($modelClass => array('name' => 'testAddMiddle', $parentField => $data[$modelClass]['id']))); $expected = array_merge(array($modelClass => array('name' => 'testAddMiddle', $parentField => '2')), $result); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $laterCount = $this->Tree->find('count'); @@ -371,7 +371,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $this->Tree->save(array('name' => 'testAddNotIndexed', $parentField => null)); $result = $this->Tree->find('first', array('fields' => array('name', $parentField), 'order' => $modelClass . '.' . $leftField . ' desc')); $expected = array($modelClass => array('name' => 'testAddNotIndexed', $parentField => null)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $validTree = $this->Tree->verify(); $this->assertIdentical($validTree, true); @@ -428,7 +428,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $expected = array(array($modelClass => array('id' => 2, 'name' => '1.1', $parentField => 1, $leftField => 2, $rightField => 5)), array($modelClass => array('id' => 5, 'name' => '1.2', $parentField => 1, $leftField => 6, $rightField => 11)), array($modelClass => array('id' => 3, 'name' => '1.1.1', $parentField => 1, $leftField => 12, $rightField => 13))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertTrue($this->Tree->verify()); } @@ -616,7 +616,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $result = $this->Tree->children(null, true, array('name')); $expected = array(array($modelClass => array('name' => '1.2', )), array($modelClass => array('name' => '1.1', ))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -639,7 +639,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $result = $this->Tree->children(null, true, array('name')); $expected = array(array($modelClass => array('name' => '1.1', )), array($modelClass => array('name' => '1.2', ))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -670,7 +670,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { array($modelClass => array('name' => '1.8', )), array($modelClass => array('name' => '1.9', )), array($modelClass => array('name' => '1.10', ))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -701,7 +701,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { array($modelClass => array('name' => '1.8', )), array($modelClass => array('name' => '1.9', )), array($modelClass => array('name' => '1.10', ))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -723,7 +723,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $result = $this->Tree->children(null, true, array('name')); $expected = array(array($modelClass => array('name' => '1.2', )), array($modelClass => array('name' => '1.1', ))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -745,7 +745,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $result = $this->Tree->children(null, true, array('name')); $expected = array(array($modelClass => array('name' => '1.1', )), array($modelClass => array('name' => '1.2', ))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -776,7 +776,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { array($modelClass => array('name' => '1.9', )), array($modelClass => array('name' => '1.10', )), array($modelClass => array('name' => '1.5', ))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -807,7 +807,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { array($modelClass => array('name' => '1.8', )), array($modelClass => array('name' => '1.9', )), array($modelClass => array('name' => '1.10', ))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -838,7 +838,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { array($modelClass => array('name' => '1.8', )), array($modelClass => array('name' => '1.9', )), array($modelClass => array('name' => '1.10', ))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -863,7 +863,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $result = $this->Tree->find('all', array('fields' => 'name', 'order' => $modelClass . '.' . $leftField . ' ASC')); $expected = array(array($modelClass => array('name' => '1.1')), array($modelClass => array('name' => '1. Root'))); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -1257,7 +1257,7 @@ class TreeBehaviorNumberTest extends CakeTestCase { $result = $this->Tree->generateTreeList(); $expected = array(1 => '1. Root', 2 => '_1.1', 3 => '__1.1.1', 4 => '__1.1.2', 5 => '_1.2', 6 => '__1.2.1', 7 => '__1.2.2'); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php index 3aa27ce0b..aabe8fe99 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php @@ -80,7 +80,7 @@ class TreeBehaviorScopedTest extends CakeTestCase { array('FlagTree' => array('id' => '4', 'name' => '1.1.2', 'parent_id' => '2', 'lft' => '5', 'rght' => '6', 'flag' => '0')), array('FlagTree' => array('id' => '5', 'name' => '1.1.3', 'parent_id' => '2', 'lft' => '7', 'rght' => '8', 'flag' => '0')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Tree->Behaviors->attach('Tree', array('scope' => 'FlagTree.flag = 1')); $this->assertEqual($this->Tree->children(), array()); @@ -90,7 +90,7 @@ class TreeBehaviorScopedTest extends CakeTestCase { $result = $this->Tree->children(); $expected = array(array('FlagTree' => array('id' => '2', 'name' => '1.1', 'parent_id' => '1', 'lft' => '2', 'rght' => '9', 'flag' => '1'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertTrue($this->Tree->delete()); $this->assertEqual($this->Tree->find('count'), 11); @@ -117,7 +117,7 @@ class TreeBehaviorScopedTest extends CakeTestCase { array('FlagTree' => array('id' => '4', 'name' => '1.1.2', 'parent_id' => '2', 'lft' => '5', 'rght' => '6', 'flag' => '0')), array('FlagTree' => array('id' => '5', 'name' => '1.1.3', 'parent_id' => '2', 'lft' => '7', 'rght' => '8', 'flag' => '0')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Tree->Behaviors->attach('Tree', array('scope' => array('FlagTree.flag' => 1))); $this->assertEqual($this->Tree->children(), array()); @@ -127,7 +127,7 @@ class TreeBehaviorScopedTest extends CakeTestCase { $result = $this->Tree->children(); $expected = array(array('FlagTree' => array('id' => '2', 'name' => '1.1', 'parent_id' => '1', 'lft' => '2', 'rght' => '9', 'flag' => '1'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertTrue($this->Tree->delete()); $this->assertEqual($this->Tree->find('count'), 11); @@ -197,7 +197,7 @@ class TreeBehaviorScopedTest extends CakeTestCase { 'flag' => 0, 'locale' => 'eng', ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); //update existing record, same locale $this->Tree->create(); @@ -214,7 +214,7 @@ class TreeBehaviorScopedTest extends CakeTestCase { 'flag' => 0, 'locale' => 'eng', ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); //update different locale, same record $this->Tree->create(); @@ -239,7 +239,7 @@ class TreeBehaviorScopedTest extends CakeTestCase { 'flag' => 0, 'locale' => 'deu', ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); //Save with bindTranslation $this->Tree->locale = 'eng'; @@ -263,7 +263,7 @@ class TreeBehaviorScopedTest extends CakeTestCase { array('id' => 22, 'locale' => 'spa', 'model' => 'FlagTree', 'foreign_key' => 2, 'field' => 'name', 'content' => 'Nuevo leyenda') ), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -319,6 +319,6 @@ class TreeBehaviorScopedTest extends CakeTestCase { 'lft' => 1, 'rght' => 2 )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php index 0cb8e93da..0b624ab12 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php @@ -108,7 +108,7 @@ class TreeBehaviorUuidTest extends CakeTestCase { $expected = array(array($modelClass => array('name' => '1.1', $leftField => 2, $rightField => 5)), array($modelClass => array('name' => '1.2', $leftField => 6, $rightField => 11)), array($modelClass => array('name' => '1.1.1', $leftField => 12, $rightField => 13))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertTrue($this->Tree->verify()); } diff --git a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php index 6e08327f6..461404d90 100644 --- a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php +++ b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php @@ -625,11 +625,11 @@ class BehaviorCollectionTest extends CakeTestCase { array('Apple' => array('id' => '3', 'name' => 'green blue', 'mytime' => '22:57:17')) ); $result = $Apple->find('all', array('conditions' => array('Apple.id <' => '4'))); - $this->assertEqual($result, $expected2); + $this->assertEqual($expected, $result2); $Apple->Behaviors->disable('Test'); $result = $Apple->find('all'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Apple->Behaviors->attach('Test', array('beforeFind' => 'off', 'afterFind' => 'on')); $this->assertIdentical($Apple->find('all'), array()); @@ -697,11 +697,11 @@ class BehaviorCollectionTest extends CakeTestCase { $Apple->Child->Behaviors->attach('Test', array('before' => 'modify')); $result = $Apple->find('all', array('fields' => array('Apple.id'), 'conditions' => array('Apple.id <' => '4'))); - //$this->assertEqual($result, $expected2); + //$this->assertEqual($expected, $result2); $Apple->Child->Behaviors->disable('Test'); $result = $Apple->find('all'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Apple->Child->Behaviors->attach('Test', array('before' => 'off', 'after' => 'on')); //$this->assertIdentical($Apple->find('all'), array()); @@ -768,11 +768,11 @@ class BehaviorCollectionTest extends CakeTestCase { 'Child' => array()) ); $result = $Apple->find('all', array('fields' => array('Apple.id'), 'conditions' => array('Apple.id <' => '4'))); - //$this->assertEqual($result, $expected2); + //$this->assertEqual($expected, $result2); $Apple->Sample->Behaviors->disable('Test'); $result = $Apple->find('all'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Apple->Sample->Behaviors->attach('Test', array('before' => 'off', 'after' => 'on')); //$this->assertIdentical($Apple->find('all'), array()); @@ -837,11 +837,11 @@ class BehaviorCollectionTest extends CakeTestCase { 'fields' => array('Apple.id', 'Parent.id', 'Parent.name', 'Parent.mytime'), 'conditions' => array('Apple.id <' => '4') )); - $this->assertEqual($result, $expected2); + $this->assertEqual($expected, $result2); $Apple->Parent->Behaviors->disable('Test'); $result = $Apple->find('all'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Apple->Parent->Behaviors->attach('Test', array('after' => 'off')); $this->assertEqual($Apple->find('all'), $expected); @@ -1045,11 +1045,11 @@ class BehaviorCollectionTest extends CakeTestCase { $result = $Apple->{'look for the remote'}('in the couch'); $expected = "Item.name = 'the remote' AND Location.name = 'the couch'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Apple->{'look for THE REMOTE'}('in the couch'); $expected = "Item.name = 'THE REMOTE' AND Location.name = 'the couch'"; - $this->assertEqual($result, $expected, 'Mapped method was lowercased.'); + $this->assertEqual($expected, $result, 'Mapped method was lowercased.'); } /** diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php index 77f4b9d0e..65c4c7e6a 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php @@ -393,19 +393,19 @@ class DboMssqlTest extends CakeTestCase { $result = $this->db->fields($this->model); $expected = $fields; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->db->clearFieldMappings(); $result = $this->db->fields($this->model, null, 'MssqlTestModel.*'); $expected = $fields; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->db->clearFieldMappings(); $result = $this->db->fields($this->model, null, array('*', 'AnotherModel.id', 'AnotherModel.name')); $expected = array_merge($fields, array( '[AnotherModel].[id] AS [AnotherModel__18]', '[AnotherModel].[name] AS [AnotherModel__19]')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->db->clearFieldMappings(); $result = $this->db->fields($this->model, null, array('*', 'MssqlClientTestModel.*')); @@ -415,7 +415,7 @@ class DboMssqlTest extends CakeTestCase { '[MssqlClientTestModel].[email] AS [MssqlClientTestModel__20]', 'CONVERT(VARCHAR(20), [MssqlClientTestModel].[created], 20) AS [MssqlClientTestModel__21]', 'CONVERT(VARCHAR(20), [MssqlClientTestModel].[updated], 20) AS [MssqlClientTestModel__22]')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -427,11 +427,11 @@ class DboMssqlTest extends CakeTestCase { function testDistinctFields() { $result = $this->db->fields($this->model, null, array('DISTINCT Car.country_code')); $expected = array('DISTINCT [Car].[country_code] AS [Car__0]'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->db->fields($this->model, null, 'DISTINCT Car.country_code'); $expected = array('DISTINCT [Car].[country_code] AS [Car__1]'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -479,7 +479,7 @@ class DboMssqlTest extends CakeTestCase { 'length' => 4 ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * testBuildColumn @@ -490,53 +490,53 @@ class DboMssqlTest extends CakeTestCase { $column = array('name' => 'id', 'type' => 'integer', 'null' => '', 'default' => '', 'length' => '8', 'key' => 'primary'); $result = $this->db->buildColumn($column); $expected = '[id] int IDENTITY (1, 1) NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $column = array('name' => 'client_id', 'type' => 'integer', 'null' => '', 'default' => '0', 'length' => '11'); $result = $this->db->buildColumn($column); $expected = '[client_id] int DEFAULT 0 NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $column = array('name' => 'client_id', 'type' => 'integer', 'null' => true); $result = $this->db->buildColumn($column); $expected = '[client_id] int NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // 'name' => 'type' format for columns $column = array('type' => 'integer', 'name' => 'client_id'); $result = $this->db->buildColumn($column); $expected = '[client_id] int NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $column = array('type' => 'string', 'name' => 'name'); $result = $this->db->buildColumn($column); $expected = '[name] varchar(255) NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $column = array('name' => 'name', 'type' => 'string', 'null' => '', 'default' => '', 'length' => '255'); $result = $this->db->buildColumn($column); $expected = '[name] varchar(255) DEFAULT \'\' NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $column = array('name' => 'name', 'type' => 'string', 'null' => false, 'length' => '255'); $result = $this->db->buildColumn($column); $expected = '[name] varchar(255) NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $column = array('name' => 'name', 'type' => 'string', 'null' => false, 'default' => null, 'length' => '255'); $result = $this->db->buildColumn($column); $expected = '[name] varchar(255) NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $column = array('name' => 'name', 'type' => 'string', 'null' => true, 'default' => null, 'length' => '255'); $result = $this->db->buildColumn($column); $expected = '[name] varchar(255) NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $column = array('name' => 'name', 'type' => 'string', 'null' => true, 'default' => '', 'length' => '255'); $result = $this->db->buildColumn($column); $expected = '[name] varchar(255) DEFAULT \'\''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * testBuildIndex method @@ -553,7 +553,7 @@ class DboMssqlTest extends CakeTestCase { 'PRIMARY KEY ([id])', 'ALTER TABLE items ADD CONSTRAINT client_id UNIQUE([client_id]);' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $indexes = array('client_id' => array('column' => 'client_id')); $result = $this->db->buildIndex($indexes, 'items'); @@ -562,7 +562,7 @@ class DboMssqlTest extends CakeTestCase { $indexes = array('client_id' => array('column' => array('client_id', 'period_id'), 'unique' => 1)); $result = $this->db->buildIndex($indexes, 'items'); $expected = array('ALTER TABLE items ADD CONSTRAINT client_id UNIQUE([client_id], [period_id]);'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * testUpdateAllSyntax method @@ -620,7 +620,7 @@ class DboMssqlTest extends CakeTestCase { 'INSERT INTO [mssql_test_models] ([id], [name], [login]) VALUES (2, \'Renan\', \'renan.saddam\')', 'SET IDENTITY_INSERT [mssql_test_models] OFF' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $fields = array('name', 'login'); $values = array('(\'Larry\', \'PhpNut\')', '(\'Renan\', \'renan.saddam\')'); @@ -631,7 +631,7 @@ class DboMssqlTest extends CakeTestCase { 'INSERT INTO [mssql_test_models] ([name], [login]) VALUES (\'Larry\', \'PhpNut\')', 'INSERT INTO [mssql_test_models] ([name], [login]) VALUES (\'Renan\', \'renan.saddam\')' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * testLastError diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index 5535cfd4a..225b10be5 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -108,7 +108,7 @@ class DboMysqlTest extends CakeTestCase { '`MysqlTestModel`.`created`', '`MysqlTestModel`.`updated`' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = 1.2; $result = $this->Dbo->value(1.2, 'float'); @@ -283,7 +283,7 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '`testName` DEFAULT NULL COMMENT \'test\''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'testName', @@ -296,7 +296,7 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '`testName` CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Dbo->columns = $restore; } @@ -402,7 +402,7 @@ class DboMysqlTest extends CakeTestCase { 'pointless_small_int' => array('column' => 'small_int', 'unique' => 0), 'one_way' => array('column' => array('bool', 'small_int'), 'unique' => 0), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -413,43 +413,43 @@ class DboMysqlTest extends CakeTestCase { public function testColumn() { $result = $this->Dbo->column('varchar(50)'); $expected = 'string'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->column('text'); $expected = 'text'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->column('int(11)'); $expected = 'integer'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->column('int(11) unsigned'); $expected = 'integer'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->column('tinyint(1)'); $expected = 'boolean'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->column('boolean'); $expected = 'boolean'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->column('float'); $expected = 'float'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->column('float unsigned'); $expected = 'float'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->column('double unsigned'); $expected = 'float'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->column('decimal(14,7) unsigned'); $expected = 'float'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -618,7 +618,7 @@ class DboMysqlTest extends CakeTestCase { $this->assertEqual($result['Collation'], 'utf8_general_ci'); $this->assertEqual($result['Engine'], 'InnoDB'); $this->assertEqual($result['charset'], 'utf8'); - + $this->Dbo->rawQuery($this->Dbo->dropSchema($schema1)); } @@ -673,7 +673,7 @@ class DboMysqlTest extends CakeTestCase { 'charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'InnoDB'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $table = $this->Dbo->fullTableName($tableName); $this->Dbo->rawQuery('CREATE TABLE ' . $table . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id)) ENGINE=MyISAM DEFAULT CHARSET=cp1250 COLLATE=cp1250_general_ci;'); @@ -683,7 +683,7 @@ class DboMysqlTest extends CakeTestCase { 'charset' => 'cp1250', 'collate' => 'cp1250_general_ci', 'engine' => 'MyISAM'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -703,7 +703,7 @@ class DboMysqlTest extends CakeTestCase { 'DEFAULT CHARSET=utf8', 'COLLATE=utf8_unicode_ci', 'ENGINE=InnoDB'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -736,7 +736,7 @@ class DboMysqlTest extends CakeTestCase { $result = $this->Dbo->fields($model, null, array('data', 'other__field')); $expected = array('`BinaryTest`.`data`', '(SUM(id)) AS `BinaryTest_$_other__field`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1765,7 +1765,7 @@ class DboMysqlTest extends CakeTestCase { $this->Model = new TestModel4(); $result = $this->Dbo->fields($this->Model, 'Vendor', "DISTINCT Vendor.id, Vendor.name"); $expected = array('DISTINCT `Vendor`.`id`', '`Vendor`.`name`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1777,112 +1777,112 @@ class DboMysqlTest extends CakeTestCase { function testStringConditionsParsing() { $result = $this->Dbo->conditions("ProjectBid.project_id = Project.id"); $expected = " WHERE `ProjectBid`.`project_id` = `Project`.`id`"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("Candy.name LIKE 'a' AND HardCandy.name LIKE 'c'"); $expected = " WHERE `Candy`.`name` LIKE 'a' AND `HardCandy`.`name` LIKE 'c'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("HardCandy.name LIKE 'a' AND Candy.name LIKE 'c'"); $expected = " WHERE `HardCandy`.`name` LIKE 'a' AND `Candy`.`name` LIKE 'c'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("Post.title = '1.1'"); $expected = " WHERE `Post`.`title` = '1.1'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("User.id != 0 AND User.user LIKE '%arr%'"); $expected = " WHERE `User`.`id` != 0 AND `User`.`user` LIKE '%arr%'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("SUM(Post.comments_count) > 500"); $expected = " WHERE SUM(`Post`.`comments_count`) > 500"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("(Post.created < '" . date('Y-m-d H:i:s') . "') GROUP BY YEAR(Post.created), MONTH(Post.created)"); $expected = " WHERE (`Post`.`created` < '" . date('Y-m-d H:i:s') . "') GROUP BY YEAR(`Post`.`created`), MONTH(`Post`.`created`)"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("score BETWEEN 90.1 AND 95.7"); $expected = " WHERE score BETWEEN 90.1 AND 95.7"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('score' => array(2=>1, 2, 10))); $expected = " WHERE score IN (1, 2, 10)"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("Aro.rght = Aro.lft + 1.1"); $expected = " WHERE `Aro`.`rght` = `Aro`.`lft` + 1.1"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("(Post.created < '" . date('Y-m-d H:i:s') . "') GROUP BY YEAR(Post.created), MONTH(Post.created)"); $expected = " WHERE (`Post`.`created` < '" . date('Y-m-d H:i:s') . "') GROUP BY YEAR(`Post`.`created`), MONTH(`Post`.`created`)"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('Sportstaette.sportstaette LIKE "%ru%" AND Sportstaette.sportstaettenart_id = 2'); $expected = ' WHERE `Sportstaette`.`sportstaette` LIKE "%ru%" AND `Sportstaette`.`sportstaettenart_id` = 2'; $this->assertPattern('/\s*WHERE\s+`Sportstaette`\.`sportstaette`\s+LIKE\s+"%ru%"\s+AND\s+`Sports/', $result); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('Sportstaette.sportstaettenart_id = 2 AND Sportstaette.sportstaette LIKE "%ru%"'); $expected = ' WHERE `Sportstaette`.`sportstaettenart_id` = 2 AND `Sportstaette`.`sportstaette` LIKE "%ru%"'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('SUM(Post.comments_count) > 500 AND NOT Post.title IS NULL AND NOT Post.extended_title IS NULL'); $expected = ' WHERE SUM(`Post`.`comments_count`) > 500 AND NOT `Post`.`title` IS NULL AND NOT `Post`.`extended_title` IS NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('NOT Post.title IS NULL AND NOT Post.extended_title IS NULL AND SUM(Post.comments_count) > 500'); $expected = ' WHERE NOT `Post`.`title` IS NULL AND NOT `Post`.`extended_title` IS NULL AND SUM(`Post`.`comments_count`) > 500'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('NOT Post.extended_title IS NULL AND NOT Post.title IS NULL AND Post.title != "" AND SPOON(SUM(Post.comments_count) + 1.1) > 500'); $expected = ' WHERE NOT `Post`.`extended_title` IS NULL AND NOT `Post`.`title` IS NULL AND `Post`.`title` != "" AND SPOON(SUM(`Post`.`comments_count`) + 1.1) > 500'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('NOT Post.title_extended IS NULL AND NOT Post.title IS NULL AND Post.title_extended != Post.title'); $expected = ' WHERE NOT `Post`.`title_extended` IS NULL AND NOT `Post`.`title` IS NULL AND `Post`.`title_extended` != `Post`.`title`'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("Comment.id = 'a'"); $expected = " WHERE `Comment`.`id` = 'a'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("lower(Article.title) LIKE 'a%'"); $expected = " WHERE lower(`Article`.`title`) LIKE 'a%'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('((MATCH(Video.title) AGAINST(\'My Search*\' IN BOOLEAN MODE) * 2) + (MATCH(Video.description) AGAINST(\'My Search*\' IN BOOLEAN MODE) * 0.4) + (MATCH(Video.tags) AGAINST(\'My Search*\' IN BOOLEAN MODE) * 1.5))'); $expected = ' WHERE ((MATCH(`Video`.`title`) AGAINST(\'My Search*\' IN BOOLEAN MODE) * 2) + (MATCH(`Video`.`description`) AGAINST(\'My Search*\' IN BOOLEAN MODE) * 0.4) + (MATCH(`Video`.`tags`) AGAINST(\'My Search*\' IN BOOLEAN MODE) * 1.5))'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('DATEDIFF(NOW(),Article.published) < 1 && Article.live=1'); $expected = " WHERE DATEDIFF(NOW(),`Article`.`published`) < 1 && `Article`.`live`=1"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('file = "index.html"'); $expected = ' WHERE file = "index.html"'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions("file = 'index.html'"); $expected = " WHERE file = 'index.html'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $letter = $letter = 'd.a'; $conditions = array('Company.name like ' => $letter . '%'); $result = $this->Dbo->conditions($conditions); $expected = " WHERE `Company`.`name` like 'd.a%'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $conditions = array('Artist.name' => 'JUDY and MARY'); $result = $this->Dbo->conditions($conditions); $expected = " WHERE `Artist`.`name` = 'JUDY and MARY'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $conditions = array('Artist.name' => 'JUDY AND MARY'); $result = $this->Dbo->conditions($conditions); $expected = " WHERE `Artist`.`name` = 'JUDY AND MARY'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1894,20 +1894,20 @@ class DboMysqlTest extends CakeTestCase { function testQuotesInStringConditions() { $result = $this->Dbo->conditions('Member.email = \'mariano@cricava.com\''); $expected = ' WHERE `Member`.`email` = \'mariano@cricava.com\''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('Member.email = "mariano@cricava.com"'); $expected = ' WHERE `Member`.`email` = "mariano@cricava.com"'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('Member.email = \'mariano@cricava.com\' AND Member.user LIKE \'mariano.iglesias%\''); $expected = ' WHERE `Member`.`email` = \'mariano@cricava.com\' AND `Member`.`user` LIKE \'mariano.iglesias%\''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions('Member.email = "mariano@cricava.com" AND Member.user LIKE "mariano.iglesias%"'); $expected = ' WHERE `Member`.`email` = "mariano@cricava.com" AND `Member`.`user` LIKE "mariano.iglesias%"'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2026,67 +2026,67 @@ class DboMysqlTest extends CakeTestCase { $result = $this->Dbo->conditions(array('HardCandy.name LIKE' => 'a', 'Candy.name LIKE' => 'c')); $expected = " WHERE `HardCandy`.`name` LIKE 'a' AND `Candy`.`name` LIKE 'c'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('HardCandy.name LIKE' => 'a%', 'Candy.name LIKE' => '%c%')); $expected = " WHERE `HardCandy`.`name` LIKE 'a%' AND `Candy`.`name` LIKE '%c%'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('HardCandy.name LIKE' => 'to be or%', 'Candy.name LIKE' => '%not to be%')); $expected = " WHERE `HardCandy`.`name` LIKE 'to be or%' AND `Candy`.`name` LIKE '%not to be%'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('score BETWEEN ? AND ?' => array(90.1, 95.7))); $expected = " WHERE `score` BETWEEN 90.100000 AND 95.700000"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Post.title' => 1.1)); $expected = " WHERE `Post`.`title` = 1.100000"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Post.title' => 1.1), true, true, new Post()); $expected = " WHERE `Post`.`title` = '1.1'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('SUM(Post.comments_count) >' => '500')); $expected = " WHERE SUM(`Post`.`comments_count`) > '500'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('MAX(Post.rating) >' => '50')); $expected = " WHERE MAX(`Post`.`rating`) > '50'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('title LIKE' => '%hello')); $expected = " WHERE `title` LIKE '%hello'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Post.name' => 'mad(g)ik')); $expected = " WHERE `Post`.`name` = 'mad(g)ik'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('score' => array(1, 2, 10))); $expected = " WHERE score IN (1, 2, 10)"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('score' => array())); $expected = " WHERE `score` IS NULL"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('score !=' => array())); $expected = " WHERE `score` IS NOT NULL"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('score !=' => '20')); $expected = " WHERE `score` != '20'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('score >' => '20')); $expected = " WHERE `score` > '20'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('client_id >' => '20'), true, true, new TestModel()); $expected = " WHERE `client_id` > 20"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('OR' => array( array('User.user' => 'mariano'), @@ -2094,63 +2094,63 @@ class DboMysqlTest extends CakeTestCase { ))); $expected = " WHERE ((`User`.`user` = 'mariano') OR (`User`.`user` = 'nate'))"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('or' => array( 'score BETWEEN ? AND ?' => array('4', '5'), 'rating >' => '20' ))); $expected = " WHERE ((`score` BETWEEN '4' AND '5') OR (`rating` > '20'))"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('or' => array( 'score BETWEEN ? AND ?' => array('4', '5'), array('score >' => '20') ))); $expected = " WHERE ((`score` BETWEEN '4' AND '5') OR (`score` > '20'))"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('and' => array( 'score BETWEEN ? AND ?' => array('4', '5'), array('score >' => '20') ))); $expected = " WHERE ((`score` BETWEEN '4' AND '5') AND (`score` > '20'))"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array( 'published' => 1, 'or' => array('score >' => '2', array('score >' => '20')) )); $expected = " WHERE `published` = 1 AND ((`score` > '2') OR (`score` > '20'))"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array(array('Project.removed' => false))); $expected = " WHERE `Project`.`removed` = '0'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array(array('Project.removed' => true))); $expected = " WHERE `Project`.`removed` = '1'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array(array('Project.removed' => null))); $expected = " WHERE `Project`.`removed` IS NULL"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array(array('Project.removed !=' => null))); $expected = " WHERE `Project`.`removed` IS NOT NULL"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('(Usergroup.permissions) & 4' => 4)); $expected = " WHERE (`Usergroup`.`permissions`) & 4 = 4"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('((Usergroup.permissions) & 4)' => 4)); $expected = " WHERE ((`Usergroup`.`permissions`) & 4) = 4"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Post.modified >=' => 'DATE_SUB(NOW(), INTERVAL 7 DAY)')); $expected = " WHERE `Post`.`modified` >= 'DATE_SUB(NOW(), INTERVAL 7 DAY)'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Post.modified >= DATE_SUB(NOW(), INTERVAL 7 DAY)')); $expected = " WHERE `Post`.`modified` >= DATE_SUB(NOW(), INTERVAL 7 DAY)"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array( 'NOT' => array('Course.id' => null, 'Course.vet' => 'N', 'level_of_education_id' => array(912,999)), @@ -2163,7 +2163,7 @@ class DboMysqlTest extends CakeTestCase { $result = $this->Dbo->conditions(array('TestModel.field =' => 'gribe$@()lu')); $expected = " WHERE `TestModel`.`field` = 'gribe$@()lu'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $conditions['NOT'] = array('Listing.expiration BETWEEN ? AND ?' => array("1", "100")); $conditions[0]['OR'] = array( @@ -2178,69 +2178,69 @@ class DboMysqlTest extends CakeTestCase { $expected = " WHERE NOT (`Listing`.`expiration` BETWEEN '1' AND '100') AND" . " ((`Listing`.`title` LIKE '%term%') OR (`Listing`.`description` LIKE '%term%')) AND" . " ((`Listing`.`title` LIKE '%term_2%') OR (`Listing`.`description` LIKE '%term_2%'))"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('MD5(CONCAT(Reg.email,Reg.id))' => 'blah')); $expected = " WHERE MD5(CONCAT(`Reg`.`email`,`Reg`.`id`)) = 'blah'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array( 'MD5(CONCAT(Reg.email,Reg.id))' => array('blah', 'blahblah') )); $expected = " WHERE MD5(CONCAT(`Reg`.`email`,`Reg`.`id`)) IN ('blah', 'blahblah')"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $conditions = array('id' => array(2, 5, 6, 9, 12, 45, 78, 43, 76)); $result = $this->Dbo->conditions($conditions); $expected = " WHERE id IN (2, 5, 6, 9, 12, 45, 78, 43, 76)"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $conditions = array('title' => 'user(s)'); $result = $this->Dbo->conditions($conditions); $expected = " WHERE `title` = 'user(s)'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $conditions = array('title' => 'user(s) data'); $result = $this->Dbo->conditions($conditions); $expected = " WHERE `title` = 'user(s) data'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $conditions = array('title' => 'user(s,arg) data'); $result = $this->Dbo->conditions($conditions); $expected = " WHERE `title` = 'user(s,arg) data'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array("Book.book_name" => 'Java(TM)')); $expected = " WHERE `Book`.`book_name` = 'Java(TM)'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array("Book.book_name" => 'Java(TM) ')); $expected = " WHERE `Book`.`book_name` = 'Java(TM) '"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array("Book.id" => 0)); $expected = " WHERE `Book`.`id` = 0"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array("Book.id" => NULL)); $expected = " WHERE `Book`.`id` IS NULL"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Listing.beds >=' => 0)); $expected = " WHERE `Listing`.`beds` >= 0"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array( 'ASCII(SUBSTRING(keyword, 1, 1)) BETWEEN ? AND ?' => array(65, 90) )); $expected = ' WHERE ASCII(SUBSTRING(keyword, 1, 1)) BETWEEN 65 AND 90'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('or' => array( '? BETWEEN Model.field1 AND Model.field2' => '2009-03-04' ))); $expected = " WHERE '2009-03-04' BETWEEN Model.field1 AND Model.field2"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2254,19 +2254,19 @@ class DboMysqlTest extends CakeTestCase { 'CAST(Book.created AS DATE)' => '2008-08-02' )); $expected = " WHERE CAST(`Book`.`created` AS DATE) = '2008-08-02'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array( 'CAST(Book.created AS DATE) <=' => '2008-08-02' )); $expected = " WHERE CAST(`Book`.`created` AS DATE) <= '2008-08-02'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array( '(Stats.clicks * 100) / Stats.views >' => 50 )); $expected = " WHERE (`Stats`.`clicks` * 100) / `Stats`.`views` > 50"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2280,7 +2280,7 @@ class DboMysqlTest extends CakeTestCase { $conditions[] = array('User.last_name' => 'Lastname'); $result = $this->Dbo->conditions($conditions); $expected = " WHERE `User`.`first_name` = 'Firstname' AND `User`.`last_name` = 'Lastname'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $conditions = array( 'Thread.project_id' => 5, @@ -2316,27 +2316,27 @@ class DboMysqlTest extends CakeTestCase { $result = $this->Dbo->conditions(array('Article2.viewed >=' => 0), true, true, $this->Model); $expected = " WHERE `Article2`.`viewed` >= 0"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Article2.viewed >=' => '0'), true, true, $this->Model); $expected = " WHERE `Article2`.`viewed` >= 0"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Article2.viewed >=' => '1'), true, true, $this->Model); $expected = " WHERE `Article2`.`viewed` >= 1"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Article2.rate_sum BETWEEN ? AND ?' => array(0, 10)), true, true, $this->Model); $expected = " WHERE `Article2`.`rate_sum` BETWEEN 0 AND 10"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Article2.rate_sum BETWEEN ? AND ?' => array('0', '10')), true, true, $this->Model); $expected = " WHERE `Article2`.`rate_sum` BETWEEN 0 AND 10"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->conditions(array('Article2.rate_sum BETWEEN ? AND ?' => array('1', '10')), true, true, $this->Model); $expected = " WHERE `Article2`.`rate_sum` BETWEEN 1 AND 10"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2349,15 +2349,15 @@ class DboMysqlTest extends CakeTestCase { $this->Model = new TestModel(); $result = $this->Dbo->fields($this->Model, 'Vendor', "Vendor.id, COUNT(Model.vendor_id) AS `Vendor`.`count`"); $expected = array('`Vendor`.`id`', 'COUNT(`Model`.`vendor_id`) AS `Vendor`.`count`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, 'Vendor', "`Vendor`.`id`, COUNT(`Model`.`vendor_id`) AS `Vendor`.`count`"); $expected = array('`Vendor`.`id`', 'COUNT(`Model`.`vendor_id`) AS `Vendor`.`count`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, 'Post', "CONCAT(REPEAT(' ', COUNT(Parent.name) - 1), Node.name) AS name, Node.created"); $expected = array("CONCAT(REPEAT(' ', COUNT(`Parent`.`name`) - 1), Node.name) AS name", "`Node`.`created`"); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, 'round( (3.55441 * fooField), 3 ) AS test'); $this->assertEqual($result, array('round( (3.55441 * fooField), 3 ) AS test')); @@ -2370,18 +2370,18 @@ class DboMysqlTest extends CakeTestCase { $result = $this->Dbo->fields($this->Model, 'Post', "Node.created, CONCAT(REPEAT(' ', COUNT(Parent.name) - 1), Node.name) AS name"); $expected = array("`Node`.`created`", "CONCAT(REPEAT(' ', COUNT(`Parent`.`name`) - 1), Node.name) AS name"); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, 'Post', "2.2,COUNT(*), SUM(Something.else) as sum, Node.created, CONCAT(REPEAT(' ', COUNT(Parent.name) - 1), Node.name) AS name,Post.title,Post.1,1.1"); $expected = array( '2.2', 'COUNT(*)', 'SUM(`Something`.`else`) as sum', '`Node`.`created`', "CONCAT(REPEAT(' ', COUNT(`Parent`.`name`) - 1), Node.name) AS name", '`Post`.`title`', '`Post`.`1`', '1.1' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, "(`Provider`.`star_total` / `Provider`.`total_ratings`) as `rating`"); $expected = array("(`Provider`.`star_total` / `Provider`.`total_ratings`) as `rating`"); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, 'Post'); $expected = array( @@ -2391,7 +2391,7 @@ class DboMysqlTest extends CakeTestCase { '`Post`.`url`', '`Post`.`email`', '`Post`.`comments`', '`Post`.`last_login`', '`Post`.`created`', '`Post`.`updated`' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, 'Other'); $expected = array( @@ -2401,27 +2401,27 @@ class DboMysqlTest extends CakeTestCase { '`Other`.`url`', '`Other`.`email`', '`Other`.`comments`', '`Other`.`last_login`', '`Other`.`created`', '`Other`.`updated`' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, array(), false); $expected = array('id', 'client_id', 'name', 'login', 'passwd', 'addr_1', 'addr_2', 'zip_code', 'city', 'country', 'phone', 'fax', 'url', 'email', 'comments', 'last_login', 'created', 'updated'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, 'COUNT(*)'); $expected = array('COUNT(*)'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, 'SUM(Thread.unread_buyer) AS ' . $this->Dbo->name('sum_unread_buyer')); $expected = array('SUM(`Thread`.`unread_buyer`) AS `sum_unread_buyer`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, 'name, count(*)'); $expected = array('`TestModel`.`name`', 'count(*)'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, 'count(*), name'); $expected = array('count(*)', '`TestModel`.`name`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields( $this->Model, null, 'field1, field2, field3, count(*), name' @@ -2430,29 +2430,29 @@ class DboMysqlTest extends CakeTestCase { '`TestModel`.`field1`', '`TestModel`.`field2`', '`TestModel`.`field3`', 'count(*)', '`TestModel`.`name`' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, array('dayofyear(now())')); $expected = array('dayofyear(now())'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, array('MAX(Model.field) As Max')); $expected = array('MAX(`Model`.`field`) As Max'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, array('Model.field AS AnotherName')); $expected = array('`Model`.`field` AS `AnotherName`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, array('field AS AnotherName')); $expected = array('`field` AS `AnotherName`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, null, array( 'TestModel.field AS AnotherName' )); $expected = array('`TestModel`.`field` AS `AnotherName`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->Model, 'Foo', array( 'id', 'title', '(user_count + discussion_count + post_count) AS score' @@ -2462,7 +2462,7 @@ class DboMysqlTest extends CakeTestCase { '`Foo`.`title`', '(user_count + discussion_count + post_count) AS score' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2478,7 +2478,7 @@ class DboMysqlTest extends CakeTestCase { '`TestModel`.`id`', "CASE Sample.id WHEN 1 THEN 'Id One' ELSE 'Other Id' END AS case_col" ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2537,7 +2537,7 @@ class DboMysqlTest extends CakeTestCase { function testOrderParsing() { $result = $this->Dbo->order("ADDTIME(Event.time_begin, '-06:00:00') ASC"); $expected = " ORDER BY ADDTIME(`Event`.`time_begin`, '-06:00:00') ASC"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->order("title, id"); $this->assertPattern('/^\s*ORDER BY\s+`title`\s+ASC,\s+`id`\s+ASC\s*$/', $result); @@ -2568,7 +2568,7 @@ class DboMysqlTest extends CakeTestCase { $result = $this->Dbo->order("Dealer.id = 7 desc, Dealer.id = 3 desc, Dealer.title asc"); $expected = " ORDER BY `Dealer`.`id` = 7 desc, `Dealer`.`id` = 3 desc, `Dealer`.`title` asc"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->order(array("Page.name" => "='test' DESC")); $this->assertPattern("/^\s*ORDER BY\s+`Page`\.`name`\s*='test'\s+DESC\s*$/", $result); @@ -2593,15 +2593,15 @@ class DboMysqlTest extends CakeTestCase { $result = $this->Dbo->order("Anuncio.destaque & 2 DESC"); $expected = ' ORDER BY `Anuncio`.`destaque` & 2 DESC'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->order("3963.191 * id"); $expected = ' ORDER BY 3963.191 * id ASC'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->order(array('Property.sale_price IS NULL')); $expected = ' ORDER BY `Property`.`sale_price` IS NULL ASC'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2666,27 +2666,27 @@ class DboMysqlTest extends CakeTestCase { function testLength() { $result = $this->Dbo->length('varchar(255)'); $expected = 255; - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $this->Dbo->length('int(11)'); $expected = 11; - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $this->Dbo->length('float(5,3)'); $expected = '5,3'; - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $this->Dbo->length('decimal(5,2)'); $expected = '5,2'; - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $this->Dbo->length("enum('test','me','now')"); $expected = 4; - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $this->Dbo->length("set('a','b','cd')"); $expected = 2; - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $this->expectError(); $result = $this->Dbo->length(false); @@ -2694,11 +2694,11 @@ class DboMysqlTest extends CakeTestCase { $result = $this->Dbo->length('datetime'); $expected = null; - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $this->Dbo->length('text'); $expected = null; - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -2713,21 +2713,21 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildIndex($data); $expected = array('PRIMARY KEY (`id`)'); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $data = array( 'MyIndex' => array('column' => 'id', 'unique' => true) ); $result = $this->Dbo->buildIndex($data); $expected = array('UNIQUE KEY `MyIndex` (`id`)'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'MyIndex' => array('column' => array('id', 'name'), 'unique' => true) ); $result = $this->Dbo->buildIndex($data); $expected = array('UNIQUE KEY `MyIndex` (`id`, `name`)'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2757,7 +2757,7 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '`testName` varchar(255) DEFAULT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'int_field', @@ -2770,7 +2770,7 @@ class DboMysqlTest extends CakeTestCase { $this->Dbo->columns = array('integer' => array('name' => 'int', 'limit' => '11', 'formatter' => 'intval'), ); $result = $this->Dbo->buildColumn($data); $expected = '`int_field` int(11) NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Dbo->fieldParameters['param'] = array( 'value' => 'COLLATE', @@ -2789,7 +2789,7 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '`int_field` int(11) NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'int_field', @@ -2800,7 +2800,7 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '`int_field` int(11) COLLATE GOOD NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Dbo->columns = $restore; @@ -2812,7 +2812,7 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '`created` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'created', @@ -2822,7 +2822,7 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '`created` timestamp DEFAULT CURRENT_TIMESTAMP'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'modified', @@ -2831,7 +2831,7 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '`modified` timestamp NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'modified', @@ -2841,7 +2841,7 @@ class DboMysqlTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '`modified` timestamp NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2867,7 +2867,7 @@ class DboMysqlTest extends CakeTestCase { $this->Dbo->hasAny($this->Model, array('TestModel.name' => 'harry')); $this->Dbo->hasAny($this->Model, array()); - + } /** @@ -3143,7 +3143,7 @@ class DboMysqlTest extends CakeTestCase { $commentTable = $this->Dbo->fullTableName('comments'); $Article = ClassRegistry::init('Article'); $Article->virtualFields = array( - 'comment_count' => 'SELECT COUNT(*) FROM ' . $commentTable . + 'comment_count' => 'SELECT COUNT(*) FROM ' . $commentTable . ' AS Comment WHERE Article.id = Comment.article_id' ); $result = $Article->find('all'); @@ -3345,7 +3345,7 @@ class DboMysqlTest extends CakeTestCase { 'color' => 'Red 1', 'name' => 'Red Apple 1' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fetchAll('SELECT name FROM ' . $this->Dbo->fullTableName('apples') . ' ORDER BY id'); $expected = array( @@ -3357,14 +3357,14 @@ class DboMysqlTest extends CakeTestCase { array($this->Dbo->fullTableName('apples', false) => array('name' => 'My new apple')), array($this->Dbo->fullTableName('apples', false) => array('name' => 'Some odd color')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->field($this->Dbo->fullTableName('apples', false), 'SELECT color, name FROM ' . $this->Dbo->fullTableName('apples') . ' ORDER BY id'); $expected = array( 'color' => 'Red 1', 'name' => 'Red Apple 1' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Apple->unbindModel(array(), false); $result = $this->Dbo->read($Apple, array( @@ -3381,7 +3381,7 @@ class DboMysqlTest extends CakeTestCase { array('Apple' => array('name' => 'My new apple')), array('Apple' => array('name' => 'Some odd color')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->read($Article, array( 'fields' => array('id', 'user_id', 'title'), diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index c4b5da022..6844f9474 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -285,17 +285,17 @@ class DboPostgresTest extends CakeTestCase { $result = $this->Dbo->fields($this->model); $expected = $fields; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->model, null, 'PostgresTestModel.*'); $expected = $fields; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->model, null, array('*', 'AnotherModel.id', 'AnotherModel.name')); $expected = array_merge($fields, array( '"AnotherModel"."id" AS "AnotherModel__id"', '"AnotherModel"."name" AS "AnotherModel__name"')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($this->model, null, array('*', 'PostgresClientTestModel.*')); $expected = array_merge($fields, array( @@ -304,7 +304,7 @@ class DboPostgresTest extends CakeTestCase { '"PostgresClientTestModel"."email" AS "PostgresClientTestModel__email"', '"PostgresClientTestModel"."created" AS "PostgresClientTestModel__created"', '"PostgresClientTestModel"."updated" AS "PostgresClientTestModel__updated"')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -792,7 +792,7 @@ class DboPostgresTest extends CakeTestCase { function testOrderAdditionalParams() { $result = $this->Dbo->order(array('title' => 'DESC NULLS FIRST', 'body' => 'DESC')); $expected = ' ORDER BY "title" DESC NULLS FIRST, "body" DESC'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -803,15 +803,15 @@ class DboPostgresTest extends CakeTestCase { $Article = new Article; $result = $this->Dbo->fields($Article, null, array('COUNT(DISTINCT Article.id)')); $expected = array('COUNT(DISTINCT "Article"."id")'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($Article, null, array('COUNT(DISTINCT id)')); $expected = array('COUNT(DISTINCT "id")'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Dbo->fields($Article, null, array('COUNT(DISTINCT FUNC(id))')); $expected = array('COUNT(DISTINCT FUNC("id"))'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php index 9bd875d2c..68bfcc231 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php @@ -198,7 +198,7 @@ class DboSqliteTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '"int_field" integer NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'name', @@ -208,7 +208,7 @@ class DboSqliteTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '"name" varchar(20) NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'testName', @@ -220,7 +220,7 @@ class DboSqliteTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '"testName" varchar(20) DEFAULT NULL COLLATE NOCASE'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'testName', @@ -231,7 +231,7 @@ class DboSqliteTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '"testName" varchar(20) DEFAULT \'test-value\' NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'name' => 'testName', @@ -242,8 +242,8 @@ class DboSqliteTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '"testName" integer(10) DEFAULT 10 NOT NULL'; - $this->assertEqual($result, $expected); - + $this->assertEqual($expected, $result); + $data = array( 'name' => 'testName', 'type' => 'integer', @@ -254,7 +254,7 @@ class DboSqliteTest extends CakeTestCase { ); $result = $this->Dbo->buildColumn($data); $expected = '"testName" integer(10) DEFAULT 10 NOT NULL'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -299,7 +299,7 @@ class DboSqliteTest extends CakeTestCase { 'length' => null, ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index e6b8d5482..e03ccbfcc 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -24,7 +24,7 @@ App::uses('DboSource', 'Model/Datasource'); require_once dirname(dirname(__FILE__)) . DS . 'models.php'; class MockDataSource extends DataSource { - + } /** @@ -155,7 +155,7 @@ class DboSourceTest extends CakeTestCase { $expression = $this->testDb->expression("CASE Sample.id WHEN 1 THEN 'Id One' ELSE 'Other Id' END AS case_col"); $result = $this->testDb->order($expression); $expected = " ORDER BY CASE Sample.id WHEN 1 THEN 'Id One' ELSE 'Other Id' END AS case_col"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -445,14 +445,14 @@ class DboSourceTest extends CakeTestCase { 'conditions' => array('TestModel.field_name' => 'value'), 'fields' => null, 'order' => null, 'recursive' => null )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->query('findByFindBy', array('value'), $this->Model); $expected = array('first', array( 'conditions' => array('TestModel.find_by' => 'value'), 'fields' => null, 'order' => null, 'recursive' => null )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->query('findAllByFieldName', array('value'), $this->Model); $expected = array('all', array( @@ -460,7 +460,7 @@ class DboSourceTest extends CakeTestCase { 'fields' => null, 'order' => null, 'limit' => null, 'page' => null, 'recursive' => null )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->query('findAllById', array('a'), $this->Model); $expected = array('all', array( @@ -468,32 +468,32 @@ class DboSourceTest extends CakeTestCase { 'fields' => null, 'order' => null, 'limit' => null, 'page' => null, 'recursive' => null )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->query('findByFieldName', array(array('value1', 'value2', 'value3')), $this->Model); $expected = array('first', array( 'conditions' => array('TestModel.field_name' => array('value1', 'value2', 'value3')), 'fields' => null, 'order' => null, 'recursive' => null )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->query('findByFieldName', array(null), $this->Model); $expected = array('first', array( 'conditions' => array('TestModel.field_name' => null), 'fields' => null, 'order' => null, 'recursive' => null )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->query('findByFieldName', array('= a'), $this->Model); $expected = array('first', array( 'conditions' => array('TestModel.field_name' => '= a'), 'fields' => null, 'order' => null, 'recursive' => null )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->query('findByFieldName', array(), $this->Model); $expected = false; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->query('directCall', array(), $this->Model); $this->assertFalse($result); @@ -518,7 +518,7 @@ class DboSourceTest extends CakeTestCase { $result = $this->testDb->value(array('first', 2, 'third')); $expected = array('\'first\'', 2, '\'third\''); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -542,55 +542,55 @@ class DboSourceTest extends CakeTestCase { function testName() { $result = $this->testDb->name('name'); $expected = '`name`'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name(array('name', 'Model.*')); $expected = array('`name`', '`Model`.*'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name('MTD()'); $expected = 'MTD()'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name('(sm)'); $expected = '(sm)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name('name AS x'); $expected = '`name` AS `x`'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name('Model.name AS x'); $expected = '`Model`.`name` AS `x`'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name('Function(Something.foo)'); $expected = 'Function(`Something`.`foo`)'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name('Function(SubFunction(Something.foo))'); $expected = 'Function(SubFunction(`Something`.`foo`))'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name('Function(Something.foo) AS x'); $expected = 'Function(`Something`.`foo`) AS `x`'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name('name-with-minus'); $expected = '`name-with-minus`'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name(array('my-name', 'Foo-Model.*')); $expected = array('`my-name`', '`Foo-Model`.*'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name(array('Team.P%', 'Team.G/G')); $expected = array('`Team`.`P%`', '`Team`.`G/G`'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->testDb->name('Model.name as y'); $expected = '`Model`.`name` AS `y`'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -633,7 +633,7 @@ class DboSourceTest extends CakeTestCase { $log = $this->testDb->getLog(false, false); $result = Set::extract($log['log'], '/query'); $expected = array('Query 1', 'Query 2'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $oldError = $this->testDb->error; $this->testDb->error = true; @@ -644,7 +644,7 @@ class DboSourceTest extends CakeTestCase { $log = $this->testDb->getLog(false, false); $result = Set::combine($log['log'], '/query', '/error'); $expected = array('Query 1' => false, 'Query 2' => false, 'Error 1' => true); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Configure::write('debug', 2); ob_start(); @@ -775,7 +775,7 @@ class DboSourceTest extends CakeTestCase { $Article->tablePrefix = 'tbl_'; $result = $this->testDb->fullTableName($Article, false); $this->assertEqual($result, 'tbl_articles'); - + $Article->useTable = $Article->table = 'with spaces'; $Article->tablePrefix = ''; $result = $this->testDb->fullTableName($Article); diff --git a/lib/Cake/Test/Case/Model/DbAclTest.php b/lib/Cake/Test/Case/Model/DbAclTest.php index fc0b3d2a5..bc5add77d 100644 --- a/lib/Cake/Test/Case/Model/DbAclTest.php +++ b/lib/Cake/Test/Case/Model/DbAclTest.php @@ -276,27 +276,27 @@ class AclNodeTest extends CakeTestCase { $Aco = new DbAcoTest(); $result = Set::extract($Aco->node('Controller1'), '{n}.DbAcoTest.id'); $expected = array(2, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($Aco->node('Controller1/action1'), '{n}.DbAcoTest.id'); $expected = array(3, 2, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($Aco->node('Controller2/action1'), '{n}.DbAcoTest.id'); $expected = array(7, 6, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($Aco->node('Controller1/action2'), '{n}.DbAcoTest.id'); $expected = array(5, 2, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($Aco->node('Controller1/action1/record1'), '{n}.DbAcoTest.id'); $expected = array(4, 3, 2, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($Aco->node('Controller2/action1/record1'), '{n}.DbAcoTest.id'); $expected = array(8, 7, 6, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($Aco->node('Controller2/action3'), '{n}.DbAcoTest.id'); $this->assertFalse($result); @@ -330,12 +330,12 @@ class AclNodeTest extends CakeTestCase { Configure::write('DbAclbindMode', 'string'); $result = Set::extract($Aro->node(array('DbAroUserTest' => array('id' => '1', 'foreign_key' => '1'))), '{n}.DbAroTest.id'); $expected = array(3, 2, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Configure::write('DbAclbindMode', 'array'); $result = Set::extract($Aro->node(array('DbAroUserTest' => array('id' => 4, 'foreign_key' => 2))), '{n}.DbAroTest.id'); $expected = array(4); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * testNodeObjectFind method @@ -349,12 +349,12 @@ class AclNodeTest extends CakeTestCase { $Model->id = 1; $result = Set::extract($Aro->node($Model), '{n}.DbAroTest.id'); $expected = array(3, 2, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Model->id = 2; $result = Set::extract($Aro->node($Model), '{n}.DbAroTest.id'); $expected = array(4, 2, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } @@ -380,6 +380,6 @@ class AclNodeTest extends CakeTestCase { array('DbAcoTest' => array('id' => '1', 'parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'Application', 'lft' => '1', 'rght' => '4'), 'DbAroTest' => array()), array('DbAcoTest' => array('id' => '2', 'parent_id' => '1', 'model' => null, 'foreign_key' => null, 'alias' => 'Pages', 'lft' => '2', 'rght' => '3', ), 'DbAroTest' => array()) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/Model/ModelDeleteTest.php b/lib/Cake/Test/Case/Model/ModelDeleteTest.php index bbd356002..83b07da90 100644 --- a/lib/Cake/Test/Case/Model/ModelDeleteTest.php +++ b/lib/Cake/Test/Case/Model/ModelDeleteTest.php @@ -101,7 +101,7 @@ class ModelDeleteTest extends BaseModelTest { 'item_id' => 5, 'portfolio_id' => 1 ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Portfolio->delete(1); @@ -133,7 +133,7 @@ class ModelDeleteTest extends BaseModelTest { array('ArticlesTag' => array('article_id' => '2', 'tag_id' => '1')), array('ArticlesTag' => array('article_id' => '2', 'tag_id' => '3')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->delete(1); $result = $TestModel->ArticlesTag->find('all'); @@ -142,7 +142,7 @@ class ModelDeleteTest extends BaseModelTest { array('ArticlesTag' => array('article_id' => '2', 'tag_id' => '1')), array('ArticlesTag' => array('article_id' => '2', 'tag_id' => '3')) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -172,7 +172,7 @@ class ModelDeleteTest extends BaseModelTest { ))); $this->assertTrue(is_array($result)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Book->delete(1); @@ -182,7 +182,7 @@ class ModelDeleteTest extends BaseModelTest { $expected = array(); $this->assertTrue(is_array($result)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -214,7 +214,7 @@ class ModelDeleteTest extends BaseModelTest { 'id' => 3, 'title' => 'Third Article' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->delete(3); $this->assertTrue($result); @@ -232,7 +232,7 @@ class ModelDeleteTest extends BaseModelTest { 'title' => 'First Article' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // make sure deleting a non-existent record doesn't break save() // ticket #6293 @@ -261,10 +261,10 @@ class ModelDeleteTest extends BaseModelTest { 'id' => '8208C7FE-E89C-47C5-B378-DED6C271F9B8')), array('Uuid' => array( 'id' => 'B607DAB9-88A2-46CF-B57C-842CA9E3B3B3'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } - + /** * test that delete() updates the correct records counterCache() records. * @@ -361,7 +361,7 @@ class ModelDeleteTest extends BaseModelTest { 'published' => 'N' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->deleteAll(array('Article.published' => 'N')); $this->assertTrue($result); @@ -395,7 +395,7 @@ class ModelDeleteTest extends BaseModelTest { 'title' => 'Fifth Article', 'published' => 'Y' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array('Article.user_id' => array(2, 3)); $result = $TestModel->deleteAll($data, true, true); @@ -418,7 +418,7 @@ class ModelDeleteTest extends BaseModelTest { 'title' => 'Third Article', 'published' => 'Y' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->deleteAll(array('Article.user_id' => 999)); $this->assertTrue($result, 'deleteAll returned false when all no records matched conditions. %s'); @@ -513,7 +513,7 @@ class ModelDeleteTest extends BaseModelTest { 'article_id' => '2', 'tag_id' => '3' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->delete(1); $result = $TestModel->ArticlesTag->find('all'); @@ -527,7 +527,7 @@ class ModelDeleteTest extends BaseModelTest { 'article_id' => '2', 'tag_id' => '3' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->deleteAll(array('Article.user_id' => 999)); $this->assertTrue($result, 'deleteAll returned false when all no records matched conditions. %s'); diff --git a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php index b22263caf..df645755c 100644 --- a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php +++ b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php @@ -411,7 +411,7 @@ class ModelIntegrationTest extends BaseModelTest { $TestModel->recursive = 0; $result = $TestModel->find('all'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); foreach ($expected as $key => $value) { unset($value['Comment'], $value['Tag']); @@ -420,7 +420,7 @@ class ModelIntegrationTest extends BaseModelTest { $TestModel->recursive = 0; $result = $TestModel->find('all'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($TestModel->User->find('all'), '{n}.User.id'); $this->assertEqual($result, array('1', '2', '3', '4')); @@ -1141,7 +1141,7 @@ class ModelIntegrationTest extends BaseModelTest { 'TestPluginComment' => array() )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1185,7 +1185,7 @@ class ModelIntegrationTest extends BaseModelTest { 'counterQuery' => '', 'association' => 'hasMany', ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1210,7 +1210,7 @@ class ModelIntegrationTest extends BaseModelTest { 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => '' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new ArticleFeatured(); $TestFakeModel = new ArticleFeatured(array('table' => false)); @@ -1375,17 +1375,17 @@ class ModelIntegrationTest extends BaseModelTest { $TestModel = new Test(); $result = $TestModel->alias; $expected = 'Test'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new TestAlias(); $result = $TestModel->alias; $expected = 'TestAlias'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new Test(array('alias' => 'AnotherTest')); $result = $TestModel->alias; $expected = 'AnotherTest'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1475,7 +1475,7 @@ class ModelIntegrationTest extends BaseModelTest { 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31' ))))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all'); $expected = array( @@ -1545,7 +1545,7 @@ class ModelIntegrationTest extends BaseModelTest { 'something_id' => '3', 'something_else_id' => '1' ))))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->findById(1); $expected = array( @@ -1570,13 +1570,13 @@ class ModelIntegrationTest extends BaseModelTest { 'something_id' => '1', 'something_else_id' => '2' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = $TestModel->findById(1); $TestModel->set($expected); $TestModel->save(); $result = $TestModel->findById(1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->hasAndBelongsToMany['SomethingElse']['unique'] = false; $TestModel->create(array( @@ -1637,7 +1637,7 @@ class ModelIntegrationTest extends BaseModelTest { 'something_else_id' => '3' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1694,7 +1694,7 @@ class ModelIntegrationTest extends BaseModelTest { 'father_id' => 0 ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->recursive = 3; $result = $TestModel->read(null, 1); @@ -1747,7 +1747,7 @@ class ModelIntegrationTest extends BaseModelTest { 'Father' => array() ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1855,7 +1855,7 @@ class ModelIntegrationTest extends BaseModelTest { 'updated' => '2007-03-18 10:57:31' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1869,7 +1869,7 @@ class ModelIntegrationTest extends BaseModelTest { $TestModel = new Test(); $result = $TestModel->create(); $expected = array('Test' => array('notes' => 'write some notes here')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new User(); $result = $TestModel->schema(); @@ -1919,12 +1919,12 @@ class ModelIntegrationTest extends BaseModelTest { 'length' => null )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new Article(); $result = $TestModel->create(); $expected = array('Article' => array('published' => 'N')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $FeaturedModel = new Featured(); $data = array( @@ -1990,15 +1990,15 @@ class ModelIntegrationTest extends BaseModelTest { $result = $TestModel->escapeField('test_field'); $expected = $db->name('Test.test_field'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->escapeField('TestField'); $expected = $db->name('Test.TestField'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->escapeField('DomainHandle', 'Domain'); $expected = $db->name('Domain.DomainHandle'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); ConnectionManager::create('mock', array('datasource' => 'DboMock')); $TestModel->setDataSource('mock'); @@ -2006,7 +2006,7 @@ class ModelIntegrationTest extends BaseModelTest { $result = $TestModel->escapeField('DomainHandle', 'Domain'); $expected = $db->name('Domain.DomainHandle'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Model/ModelReadTest.php b/lib/Cake/Test/Case/Model/ModelReadTest.php index 0c19376bb..84a4ea913 100644 --- a/lib/Cake/Test/Case/Model/ModelReadTest.php +++ b/lib/Cake/Test/Case/Model/ModelReadTest.php @@ -79,7 +79,7 @@ class ModelReadTest extends BaseModelTest { */ function testGroupBy() { $db = ConnectionManager::getDataSource('test'); - $isStrictGroupBy = $this->db instanceof Postgres || $this->db instanceof Sqlite || $this->db instanceof Oracle; + $isStrictGroupBy = $this->db instanceof Postgres || $this->db instanceof Sqlite || $this->db instanceof Oracle; $message = 'Postgres and Oracle have strict GROUP BY and are incompatible with this test.'; if ($this->skipIf($isStrictGroupBy, $message )) { @@ -128,7 +128,7 @@ class ModelReadTest extends BaseModelTest { 'thread_id' => 3, 'name' => 'Thread 3, Message 1' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $rows = $Thread->find('all', array( 'group' => 'Thread.project_id', @@ -142,7 +142,7 @@ class ModelReadTest extends BaseModelTest { 1 => 2, 2 => 1 ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $rows = $Thread->find('all', array( 'group' => 'Thread.project_id', @@ -157,7 +157,7 @@ class ModelReadTest extends BaseModelTest { 1 => 2, 2 => 1 ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Thread->find('all', array( 'conditions' => array('Thread.project_id' => 1), @@ -180,37 +180,37 @@ class ModelReadTest extends BaseModelTest { 'thread_id' => 1, 'name' => 'Thread 1, Message 1' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Thread->find('all', array( 'conditions' => array('Thread.project_id' => 1), 'group' => 'Thread.project_id, Project.id' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Thread->find('all', array( 'conditions' => array('Thread.project_id' => 1), 'group' => 'project_id' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Thread->find('all', array( 'conditions' => array('Thread.project_id' => 1), 'group' => array('project_id') )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Thread->find('all', array( 'conditions' => array('Thread.project_id' => 1), 'group' => array('project_id', 'Project.id') )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Thread->find('all', array( 'conditions' => array('Thread.project_id' => 1), 'group' => array('Thread.project_id', 'Project.id') )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = array( array('Product' => array('type' => 'Clothing'), array('price' => 32)), @@ -223,13 +223,13 @@ class ModelReadTest extends BaseModelTest { 'group'=> 'Product.type', 'order' => 'Product.type ASC' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Product->find('all', array( 'fields'=>array('Product.type', 'MIN(Product.price) as price'), 'group'=> array('Product.type'), 'order' => 'Product.type ASC')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -297,7 +297,7 @@ class ModelReadTest extends BaseModelTest { unset($expected[0][$this->db->fullTableName('articles', false)]); } - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->db->getQueryCache($query, $params); $this->assertFalse(empty($result)); @@ -1083,7 +1083,7 @@ class ModelReadTest extends BaseModelTest { 'name' => '' ), 'Child' => array())); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->Parent->unbindModel(array('hasOne' => array('Sample'))); $this->assertTrue($result); @@ -1749,7 +1749,7 @@ class ModelReadTest extends BaseModelTest { 'Child' => array() )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->Parent->unbindModel(array('hasOne' => array('Sample'))); $this->assertTrue($result); @@ -2178,7 +2178,7 @@ class ModelReadTest extends BaseModelTest { 'name' => '' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->unbindModel(array('hasMany' => array('Child'))); $this->assertTrue($result); @@ -2597,7 +2597,7 @@ class ModelReadTest extends BaseModelTest { 'apple_id' => '', 'name' => '' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->Parent->unbindModel(array('belongsTo' => array('Parent'))); $this->assertTrue($result); @@ -2982,7 +2982,7 @@ class ModelReadTest extends BaseModelTest { 'apple_id' => '', 'name' => '' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3102,7 +3102,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('threaded', array( 'conditions' => array('Category.name LIKE' => 'Category 1%') @@ -3155,7 +3155,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('threaded', array( 'fields' => 'id, parent_id, name' @@ -3223,7 +3223,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('threaded', array('order' => 'id DESC')); @@ -3305,7 +3305,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('threaded', array( 'conditions' => array('Category.name LIKE' => 'Category 3%') @@ -3333,7 +3333,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('threaded', array( 'conditions' => array('Category.name LIKE' => 'Category 1.1%') @@ -3361,7 +3361,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), 'children' => array())))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('threaded', array( 'fields' => 'id, parent_id, name', @@ -3411,7 +3411,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array( 'fields' => 'id, name, parent_id', @@ -3453,7 +3453,7 @@ class ModelReadTest extends BaseModelTest { 'name' => 'Category 1.1.2', 'parent_id' => '2' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('threaded', array( 'fields' => 'id, parent_id, name', @@ -3487,7 +3487,7 @@ class ModelReadTest extends BaseModelTest { 'children' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3522,7 +3522,7 @@ class ModelReadTest extends BaseModelTest { 'Article' => array( 'id' => 3 ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 3; $TestModel->recursive = 1; @@ -3549,7 +3549,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 2; $result = $TestModel->find('neighbors', array('recursive' => -1)); @@ -3577,7 +3577,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 3; $result = $TestModel->find('neighbors', array('recursive' => -1)); @@ -3595,7 +3595,7 @@ class ModelReadTest extends BaseModelTest { ), 'next' => null ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->recursive = 0; $TestModel->id = 1; @@ -3608,17 +3608,17 @@ class ModelReadTest extends BaseModelTest { $TestModel->id = 1; $result = $TestModel->find('neighbors'); $expected = array('prev' => null, 'next' => $two); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 2; $result = $TestModel->find('neighbors'); $expected = array('prev' => $one, 'next' => $three); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 3; $result = $TestModel->find('neighbors'); $expected = array('prev' => $two, 'next' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->recursive = 2; $TestModel->id = 1; @@ -3631,17 +3631,17 @@ class ModelReadTest extends BaseModelTest { $TestModel->id = 1; $result = $TestModel->find('neighbors', array('recursive' => 2)); $expected = array('prev' => null, 'next' => $two); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 2; $result = $TestModel->find('neighbors', array('recursive' => 2)); $expected = array('prev' => $one, 'next' => $three); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 3; $result = $TestModel->find('neighbors', array('recursive' => 2)); $expected = array('prev' => $two, 'next' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3918,7 +3918,7 @@ class ModelReadTest extends BaseModelTest { ), 'Child' => array() )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3977,7 +3977,7 @@ class ModelReadTest extends BaseModelTest { ) ), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -4017,7 +4017,7 @@ class ModelReadTest extends BaseModelTest { $recursive = -1; $order = 'Article.id ASC'; $result = $TestModel->find('all', compact('conditions', 'recursive', 'order')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); if ($this->skipIf($this->db instanceof Postgres, 'The rest of testFindAllWithConditionsHavingMixedDataTypes test is not compatible with Postgres')) { return; @@ -4060,7 +4060,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -4085,7 +4085,7 @@ class ModelReadTest extends BaseModelTest { $result = $TestModel->hasMany; $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->bindModel(array('hasMany' => array('Comment'))); $this->assertTrue($result); @@ -4174,7 +4174,7 @@ class ModelReadTest extends BaseModelTest { 'updated' => '2007-03-18 10:49:31' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->resetAssociations(); $result = $TestModel->hasMany; @@ -4268,7 +4268,7 @@ class ModelReadTest extends BaseModelTest { 'updated' => '2007-03-18 10:49:31' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->hasMany; $expected = array( @@ -4285,14 +4285,14 @@ class ModelReadTest extends BaseModelTest { 'finderQuery' => null, 'counterQuery' => null )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->unbindModel(array('hasMany' => array('Comment'))); $this->assertTrue($result); $result = $TestModel->hasMany; $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array( 'fields' => 'User.id, User.user' @@ -4302,7 +4302,7 @@ class ModelReadTest extends BaseModelTest { array('User' => array('id' => '2', 'user' => 'nate')), array('User' => array('id' => '3', 'user' => 'larry')), array('User' => array('id' => '4', 'user' => 'garrett'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array( 'fields' => 'User.id, User.user' @@ -4388,7 +4388,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-18 10:47:23', 'updated' => '2007-03-18 10:49:31' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->unbindModel(array('hasMany' => array('Comment')), false); $this->assertTrue($result); @@ -4399,11 +4399,11 @@ class ModelReadTest extends BaseModelTest { array('User' => array('id' => '2', 'user' => 'nate')), array('User' => array('id' => '3', 'user' => 'larry')), array('User' => array('id' => '4', 'user' => 'garrett'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->hasMany; $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->bindModel(array('hasMany' => array( 'Comment' => array('className' => 'Comment', 'conditions' => 'Comment.published = \'Y\'') @@ -4483,7 +4483,7 @@ class ModelReadTest extends BaseModelTest { 'updated' => '2007-03-18 10:49:31' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel2 = new DeviceType(); @@ -4559,7 +4559,7 @@ class ModelReadTest extends BaseModelTest { $result = $TestModel->hasMany; $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->bindModel(array( 'hasMany' => array( @@ -4651,7 +4651,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-18 10:47:23', 'updated' => '2007-03-18 10:49:31' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->bindModel(array( 'hasMany' => array( @@ -4717,7 +4717,7 @@ class ModelReadTest extends BaseModelTest { 'Items' => array() )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -4748,7 +4748,7 @@ class ModelReadTest extends BaseModelTest { $result = $TestModel->hasMany; $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->bindModel(array( 'hasMany' => array('Comment') @@ -4762,13 +4762,13 @@ class ModelReadTest extends BaseModelTest { $result = array_keys($TestModel->hasMany); $expected = array('Comment', 'Article'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->resetAssociations(); $result = array_keys($TestModel->hasMany); $expected = array('Article'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -4819,7 +4819,7 @@ class ModelReadTest extends BaseModelTest { $result = array_keys($TestModel->belongsTo); $expected = array('Article', 'User'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->unbindModel(array( 'belongsTo' => array('User') @@ -4833,13 +4833,13 @@ class ModelReadTest extends BaseModelTest { $result = array_keys($TestModel->belongsTo); $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->resetAssociations(); $result = array_keys($TestModel->belongsTo); $expected = array('User'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -4907,7 +4907,7 @@ class ModelReadTest extends BaseModelTest { 'updated' => '2007-03-17 01:18:31', 'test' => 'working' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); unset($TestModel); $Author = new Author(); @@ -4947,19 +4947,19 @@ class ModelReadTest extends BaseModelTest { $result = Set::extract($TestModel->find('all'), '/Author/user'); $expected = array('mariano (CakePHP)', 'nate (CakePHP)', 'larry (CakePHP)', 'garrett (CakePHP)'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($TestModel->find('all', array('callbacks' => 'after')), '/Author/user'); $expected = array('mariano (CakePHP)', 'nate (CakePHP)', 'larry (CakePHP)', 'garrett (CakePHP)'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($TestModel->find('all', array('callbacks' => 'before')), '/Author/user'); $expected = array('mariano', 'nate', 'larry', 'garrett'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::extract($TestModel->find('all', array('callbacks' => false)), '/Author/user'); $expected = array('mariano', 'nate', 'larry', 'garrett'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5133,7 +5133,7 @@ class ModelReadTest extends BaseModelTest { 'Image' => array() )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5234,7 +5234,7 @@ class ModelReadTest extends BaseModelTest { ), 'Tag' => array() )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5348,13 +5348,13 @@ class ModelReadTest extends BaseModelTest { 'updated' => '2007-03-18 12:28:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->hasAndBelongsToMany['Tag']['limit'] = 1; $result = $TestModel->read(null, 2); unset($expected['Tag'][1]); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5469,7 +5469,7 @@ class ModelReadTest extends BaseModelTest { 'Thread' => array() )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5576,7 +5576,7 @@ class ModelReadTest extends BaseModelTest { 'updated' => '2007-03-18 10:43:31' ))))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5644,7 +5644,7 @@ class ModelReadTest extends BaseModelTest { 'name' => 'computer' )))))); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** @@ -5709,7 +5709,7 @@ class ModelReadTest extends BaseModelTest { ))))))); $this->db->fullDebug = $fullDebug; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5774,7 +5774,7 @@ class ModelReadTest extends BaseModelTest { ))))))); $this->db->fullDebug = $fullDebug; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -5995,7 +5995,7 @@ class ModelReadTest extends BaseModelTest { )))))))); $this->db->fullDebug = $fullDebug; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -6061,7 +6061,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:22:23', 'updated' => '2007-03-17 01:24:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('conditions' => 'User.id > 2')); $expected = array( @@ -6081,7 +6081,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:22:23', 'updated' => '2007-03-17 01:24:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array( 'conditions' => array('User.id !=' => '0', 'User.user LIKE' => '%arr%') @@ -6103,11 +6103,11 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:22:23', 'updated' => '2007-03-17 01:24:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('conditions' => array('User.id' => '0'))); $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array( 'conditions' => array('or' => array('User.id' => '0', 'User.user LIKE' => '%a%') @@ -6146,7 +6146,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:22:23', 'updated' => '2007-03-17 01:24:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('fields' => 'User.id, User.user')); $expected = array( @@ -6154,7 +6154,7 @@ class ModelReadTest extends BaseModelTest { array('User' => array('id' => '2', 'user' => 'nate')), array('User' => array('id' => '3', 'user' => 'larry')), array('User' => array('id' => '4', 'user' => 'garrett'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('fields' => 'User.user', 'order' => 'User.user ASC')); $expected = array( @@ -6162,7 +6162,7 @@ class ModelReadTest extends BaseModelTest { array('User' => array('user' => 'larry')), array('User' => array('user' => 'mariano')), array('User' => array('user' => 'nate'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('fields' => 'User.user', 'order' => 'User.user DESC')); $expected = array( @@ -6170,7 +6170,7 @@ class ModelReadTest extends BaseModelTest { array('User' => array('user' => 'mariano')), array('User' => array('user' => 'larry')), array('User' => array('user' => 'garrett'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('limit' => 3, 'page' => 1)); @@ -6199,7 +6199,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:20:23', 'updated' => '2007-03-17 01:22:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $ids = array(4 => 1, 5 => 3); $result = $TestModel->find('all', array( @@ -6223,7 +6223,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:20:23', 'updated' => '2007-03-17 01:22:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // These tests are expected to fail on SQL Server since the LIMIT/OFFSET // hack can't handle small record counts. @@ -6238,11 +6238,11 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:22:23', 'updated' => '2007-03-17 01:24:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array('limit' => 3, 'page' => 3)); $expected = array(); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } @@ -6267,7 +6267,7 @@ class ModelReadTest extends BaseModelTest { 2 => 'Second Article', 3 => 'Third Article' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $db = ConnectionManager::getDataSource('test'); if ($db instanceof Mysql) { @@ -6279,7 +6279,7 @@ class ModelReadTest extends BaseModelTest { 3 => 'Third Article', 2 => 'Second Article' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } $result = Set::combine( @@ -6294,7 +6294,7 @@ class ModelReadTest extends BaseModelTest { 2 => 'Second Article', 3 => 'Third Article' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::combine( $TestModel->find('all', array( @@ -6331,7 +6331,7 @@ class ModelReadTest extends BaseModelTest { 'updated' => '2007-03-18 10:45:31' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::combine( $TestModel->find('all', array( @@ -6370,7 +6370,7 @@ class ModelReadTest extends BaseModelTest { 'updated' => '2007-03-18 10:43:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::combine( $TestModel->find('all', array( @@ -6388,7 +6388,7 @@ class ModelReadTest extends BaseModelTest { 3 => array( 2 => 'Second Article' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new Apple(); $expected = array( @@ -6413,7 +6413,7 @@ class ModelReadTest extends BaseModelTest { 2 => 'Second Post', 3 => 'Third Post' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('list', array( 'fields' => 'title' @@ -6423,7 +6423,7 @@ class ModelReadTest extends BaseModelTest { 2 => 'Second Post', 3 => 'Third Post' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('list', array( 'fields' => array('title', 'id') @@ -6433,7 +6433,7 @@ class ModelReadTest extends BaseModelTest { 'Second Post' => '2', 'Third Post' => '3' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('list', array( 'fields' => array('title', 'id', 'created') @@ -6449,7 +6449,7 @@ class ModelReadTest extends BaseModelTest { 'Third Post' => '3' ), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('list', array( 'fields' => array('Post.body') @@ -6459,7 +6459,7 @@ class ModelReadTest extends BaseModelTest { 2 => 'Second Post Body', 3 => 'Third Post Body' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('list', array( 'fields' => array('Post.title', 'Post.body') @@ -6469,7 +6469,7 @@ class ModelReadTest extends BaseModelTest { 'Second Post' => 'Second Post Body', 'Third Post' => 'Third Post Body' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('list', array( 'fields' => array('Post.id', 'Post.title', 'Author.user'), @@ -6483,7 +6483,7 @@ class ModelReadTest extends BaseModelTest { 'larry' => array( 2 => 'Second Post' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new User(); $result = $TestModel->find('list', array( @@ -6495,7 +6495,7 @@ class ModelReadTest extends BaseModelTest { 'larry' => '5f4dcc3b5aa765d61d8327deb882cf99', 'garrett' => '5f4dcc3b5aa765d61d8327deb882cf99' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new ModifiedAuthor(); $result = $TestModel->find('list', array( @@ -6507,7 +6507,7 @@ class ModelReadTest extends BaseModelTest { 3 => 'larry (CakePHP)', 4 => 'garrett (CakePHP)' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new Article(); $TestModel->displayField = 'title'; @@ -6519,7 +6519,7 @@ class ModelReadTest extends BaseModelTest { 1 => 'First Article', 3 => 'Third Article' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -6682,7 +6682,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->findByPassword('5f4dcc3b5aa765d61d8327deb882cf99'); $expected = array('User' => array( @@ -6692,7 +6692,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -6718,7 +6718,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:18:23', 'updated' => '2007-03-17 01:20:31' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->read(null, 2); $expected = array( @@ -6729,12 +6729,12 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-17 01:18:23', 'updated' => '2007-03-17 01:20:31' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 2; $result = $TestModel->read(array('id', 'user')); $expected = array('User' => array('id' => '2', 'user' => 'nate')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->read('id, user', 2); $expected = array( @@ -6742,7 +6742,7 @@ class ModelReadTest extends BaseModelTest { 'id' => '2', 'user' => 'nate' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->bindModel(array('hasMany' => array('Article'))); $this->assertTrue($result); @@ -6773,7 +6773,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-18 10:43:23', 'updated' => '2007-03-18 10:45:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -6802,7 +6802,7 @@ class ModelReadTest extends BaseModelTest { $expected = array( 'User' => array('id' => '1', 'user' => 'mariano'), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->recursive = 1; $result = $TestModel->read('id, user', 1); @@ -6830,7 +6830,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-18 10:43:23', 'updated' => '2007-03-18 10:45:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->recursive = 2; $result = $TestModel->read('id, user', 3); @@ -6887,7 +6887,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-18 12:26:23', 'updated' => '2007-03-18 12:28:31' ))))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } function testRecursiveFindAll() { @@ -6996,7 +6996,7 @@ class ModelReadTest extends BaseModelTest { 'Tag' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->find('all', array( 'conditions' => array('Article.user_id' => 3), @@ -7096,7 +7096,7 @@ class ModelReadTest extends BaseModelTest { 'updated' => '2007-03-18 12:28:31' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Featured = new Featured(); @@ -7199,7 +7199,7 @@ class ModelReadTest extends BaseModelTest { 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -7289,7 +7289,7 @@ class ModelReadTest extends BaseModelTest { 'Tag' => array() ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->hasMany['Comment']['limit'] = 1; @@ -7366,7 +7366,7 @@ class ModelReadTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * Testing availability of $this->findQueryType in Model callbacks diff --git a/lib/Cake/Test/Case/Model/ModelValidationTest.php b/lib/Cake/Test/Case/Model/ModelValidationTest.php index 2182637c8..6a305b6bb 100644 --- a/lib/Cake/Test/Case/Model/ModelValidationTest.php +++ b/lib/Cake/Test/Case/Model/ModelValidationTest.php @@ -520,7 +520,7 @@ class ModelValidationTest extends BaseModelTest { $expected = array( 'title' => array('tooShort') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->validate = array( 'title' => array( @@ -541,7 +541,7 @@ class ModelValidationTest extends BaseModelTest { $expected = array( 'title' => array('tooShort', 'onlyLetters') ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Model/ModelWriteTest.php b/lib/Cake/Test/Case/Model/ModelWriteTest.php index 2e942f636..15224e6ad 100644 --- a/lib/Cake/Test/Case/Model/ModelWriteTest.php +++ b/lib/Cake/Test/Case/Model/ModelWriteTest.php @@ -44,7 +44,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2008-01-03 10:56:33', 'updated' => '2008-01-03 10:56:33' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->JoinAsJoinB->create(); $data = array( @@ -69,7 +69,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2008-01-03 10:56:33', 'updated' => '2008-01-03 10:56:33' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $updatedValue = 'UPDATED Data for Join A 1 Join B 2'; $TestModel->JoinAsJoinB->id = 1; @@ -324,7 +324,7 @@ class ModelWriteTest extends BaseModelTest { $result = $user[$User->alias]['post_count']; $expected = 3; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -346,7 +346,7 @@ class ModelWriteTest extends BaseModelTest { $result = $user[$User->alias]['post_count']; $expected = 1; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -425,7 +425,7 @@ class ModelWriteTest extends BaseModelTest { $Category->updateCounterCache(array('parent_id' => 5)); $result = Set::extract($Category->find('all', array('conditions' => array('CategoryThread.id' => 5))), '{n}.CategoryThread.child_count'); $expected = array_fill(0, 1, 1); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -528,7 +528,7 @@ class ModelWriteTest extends BaseModelTest { 'title' => 'New First Article', 'body' => 'First Article Body' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 1; $result = $TestModel->saveField('title', ''); @@ -543,7 +543,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'First Article Body' )); $result['Article']['title'] = trim($result['Article']['title']); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->id = 1; $TestModel->set('body', 'Messed up data'); @@ -556,7 +556,7 @@ class ModelWriteTest extends BaseModelTest { 'title' => 'First Article', 'body' => 'First Article Body' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->recursive = -1; $result = $TestModel->read(array('id', 'user_id', 'title', 'body'), 1); @@ -638,7 +638,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'First Article Body', 'published' => 'N' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array('Article' => array( 'id' => 1, @@ -659,7 +659,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'First Article Body', 'published' => 'Y' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'Article' => array( @@ -708,7 +708,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2007-03-18 12:26:23', 'updated' => '2007-03-18 12:28:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array('Comment' => array( 'article_id' => '4', @@ -795,7 +795,7 @@ class ModelWriteTest extends BaseModelTest { 'updated' => '2007-03-18 12:28:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -857,7 +857,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'Fourth Article Body', 'published' => 'Y' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // Create new record just to overlap Model->id on previously created record @@ -879,7 +879,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'Fifth Article Body', 'published' => 'Y' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // Go back and edit the first article we created, starting by checking it's still there @@ -892,7 +892,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'Fourth Article Body', 'published' => 'Y' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // And now do the update with set() @@ -913,7 +913,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'Fourth Article Body', 'published' => 'N' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->recursive = -1; $result = $TestModel->read(array('id', 'user_id', 'title', 'body', 'published'), 5); @@ -924,7 +924,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'Fifth Article Body', 'published' => 'Y' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array('Article' => array('id' => '5', 'title' => 'Fifth Article - New Title 5')); $result = ($TestModel->set($data) && $TestModel->save()); @@ -939,7 +939,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'Fifth Article Body', 'published' => 'Y' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->recursive = -1; $result = $TestModel->find('all', array('fields' => array('id', 'title'))); @@ -950,7 +950,7 @@ class ModelWriteTest extends BaseModelTest { array('Article' => array('id' => 4, 'title' => 'Fourth Article - New Title' )), array('Article' => array('id' => 5, 'title' => 'Fifth Article - New Title 5' )) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -982,7 +982,7 @@ class ModelWriteTest extends BaseModelTest { 'published' => 'N' )); $result = $TestModel->read(array('id', 'user_id', 'title', 'body', 'published'), 4); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'user_id' => '1', @@ -1002,7 +1002,7 @@ class ModelWriteTest extends BaseModelTest { 'published' => 'N' )); $result = $TestModel->read(array('id', 'user_id', 'title', 'body', 'published'), 5); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1095,7 +1095,7 @@ class ModelWriteTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'Article' => array( @@ -1132,7 +1132,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2007-03-18 12:24:23', 'updated' => '2007-03-18 12:26:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array('Article' => array('id' => '2'), 'Tag' => array('Tag' => array(2, 3))); $result = $TestModel->set($data); @@ -1166,7 +1166,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2007-03-18 12:26:23', 'updated' => '2007-03-18 12:28:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array('Tag' => array('Tag' => array(1, 2, 3))); @@ -1207,7 +1207,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2007-03-18 12:26:23', 'updated' => '2007-03-18 12:28:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array('Tag' => array('Tag' => array())); $result = $TestModel->set($data); @@ -1237,7 +1237,7 @@ class ModelWriteTest extends BaseModelTest { ), 'Tag' => array() ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array('Tag' => array('Tag' => array(2, 3))); $result = $TestModel->set($data); @@ -1271,7 +1271,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2007-03-18 12:26:23', 'updated' => '2007-03-18 12:28:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'Tag' => array( @@ -1311,7 +1311,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2007-03-18 12:24:23', 'updated' => '2007-03-18 12:26:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'Tag' => array( @@ -1353,7 +1353,7 @@ class ModelWriteTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'Tag' => array( @@ -1395,7 +1395,7 @@ class ModelWriteTest extends BaseModelTest { ) ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'Tag' => array( @@ -1435,7 +1435,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2007-03-18 12:26:23', 'updated' => '2007-03-18 12:28:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'Article' => array( @@ -1484,7 +1484,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => '2007-03-18 12:26:23', 'updated' => '2007-03-18 12:28:31' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->loadFixtures('JoinA', 'JoinC', 'JoinAC', 'JoinB', 'JoinAB'); @@ -1559,7 +1559,7 @@ class ModelWriteTest extends BaseModelTest { ), 'Tag' => array() )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1745,7 +1745,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'Some text' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertEqual($TestModel->id, 5); $result = $TestModel->create($data, true); @@ -1758,7 +1758,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'Some text' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertFalse($TestModel->id); $result = $TestModel->create(array('Article' => $data), true); @@ -1771,7 +1771,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => 'Some text' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertFalse($TestModel->id); $data = array( @@ -1796,7 +1796,7 @@ class ModelWriteTest extends BaseModelTest { 'updated' => '1970-01-01 12:00:00', 'modified' => '1970-01-01 12:00:00' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertEqual($TestModel->id, 6); $result = $TestModel->create(array( @@ -1813,7 +1813,7 @@ class ModelWriteTest extends BaseModelTest { 'title' => 'My article', 'body' => 'Some text' )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertFalse($TestModel->id); } @@ -2195,12 +2195,12 @@ class ModelWriteTest extends BaseModelTest { $TestModel = new Comment(); $result = Set::extract($TestModel->find('all'), '{n}.Comment.user_id'); $expected = array('2', '4', '1', '1', '1', '2'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->updateAll(array('Comment.user_id' => 5), array('Comment.user_id' => 2)); $result = Set::combine($TestModel->find('all'), '{n}.Comment.id', '{n}.Comment.user_id'); $expected = array(1 => 5, 2 => 4, 3 => 1, 4 => 1, 5 => 1, 6 => 5); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $TestModel->updateAll( array('Comment.comment' => "'Updated today'"), @@ -2215,7 +2215,7 @@ class ModelWriteTest extends BaseModelTest { '{n}.Comment.comment' ); $expected = array_fill(0, 2, 'Updated today'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2355,7 +2355,7 @@ class ModelWriteTest extends BaseModelTest { 'updated' => '2008-01-03 10:57:22' )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $ts = date('Y-m-d H:i:s'); $TestModel->id = 1; @@ -2423,7 +2423,7 @@ class ModelWriteTest extends BaseModelTest { 'updated' => $ts )))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2517,7 +2517,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => $ts, 'updated' => $ts ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel = new Comment(); $ts = date('Y-m-d H:i:s'); @@ -2679,7 +2679,7 @@ class ModelWriteTest extends BaseModelTest { 'comment_id' => '1', 'attachment' => 'some_file.zip' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $model->Attachment->bindModel(array('belongsTo' => array('Comment')), false); @@ -2732,7 +2732,7 @@ class ModelWriteTest extends BaseModelTest { 'id' => '1', 'title' => 'Model Associations 101' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2953,7 +2953,7 @@ class ModelWriteTest extends BaseModelTest { ) ), array('validate' => true)); $expected = array('Comment' => array(false)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = array('Comment' => array( array('comment' => array('This field cannot be left blank')) @@ -3142,12 +3142,12 @@ class ModelWriteTest extends BaseModelTest { 'updated' => $ts )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // Skip the rest of the transactional tests return; } - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( array('author_id' => 1, 'title' => 'New Fourth Post'), @@ -3211,7 +3211,7 @@ class ModelWriteTest extends BaseModelTest { 'updated' => $ts )); } - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->validate = array('title' => 'notEmpty'); $data = array( @@ -3263,7 +3263,7 @@ class ModelWriteTest extends BaseModelTest { 'body' => '', 'published' => 'N' ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3337,7 +3337,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => $ts, 'updated' => $ts ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $TestModel->validate = array('title' => 'notEmpty', 'author_id' => 'numeric'); $data = array( @@ -3424,7 +3424,7 @@ class ModelWriteTest extends BaseModelTest { 'created' => $ts, 'updated' => $ts ))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertEqual($TestModel->validationErrors, $errors); $data = array( @@ -3442,7 +3442,7 @@ class ModelWriteTest extends BaseModelTest { $this->assertFalse($TestModel->saveAll($data, array('validate' => 'first'))); $result = $TestModel->find('all', array('recursive' => -1, 'order' => 'Post.id ASC')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertEqual($TestModel->validationErrors, $errors); $data = array( @@ -3628,7 +3628,7 @@ class ModelWriteTest extends BaseModelTest { 'validate' => 'first', )); $expected = array(true, false); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $Something = new Something(); $validData = array( @@ -3649,7 +3649,7 @@ class ModelWriteTest extends BaseModelTest { 'validate' => 'first', )); $expected = array(true, true); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3744,7 +3744,7 @@ class ModelWriteTest extends BaseModelTest { 'Article' => true, 'Comment' => array(false, true, false) ); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $expected = array('Comment' => array( 0 => array('comment' => array('This field cannot be left blank')), diff --git a/lib/Cake/Test/Case/Network/CakeResponseTest.php b/lib/Cake/Test/Case/Network/CakeResponseTest.php index e38cfe513..44e6f44fe 100644 --- a/lib/Cake/Test/Case/Network/CakeResponseTest.php +++ b/lib/Cake/Test/Case/Network/CakeResponseTest.php @@ -25,7 +25,7 @@ class CakeResponseTestCase extends CakeTestCase { $this->assertEquals($response->body(), 'This is the body'); $this->assertEquals($response->charset(), 'my-custom-charset'); $this->assertEquals($response->type(), 'audio/mpeg'); - $this->assertEquals($response->statusCode(), 203); + $this->assertEquals($response->statusCode(), 203); } /** @@ -300,7 +300,7 @@ class CakeResponseTestCase extends CakeTestCase { $result = $response->httpCodes(100); $expected = array(100 => 'Continue'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $codes = array( 1337 => 'Undefined Unicorn', @@ -313,7 +313,7 @@ class CakeResponseTestCase extends CakeTestCase { $result = $response->httpCodes(1337); $expected = array(1337 => 'Undefined Unicorn'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $codes = array(404 => 'Sorry Bro'); $result = $response->httpCodes($codes); @@ -322,7 +322,7 @@ class CakeResponseTestCase extends CakeTestCase { $result = $response->httpCodes(404); $expected = array(404 => 'Sorry Bro'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -353,4 +353,4 @@ class CakeResponseTestCase extends CakeTestCase { $result = $response->mapType(array('application/json', 'application/xhtml+xml', 'text/css')); $this->assertEquals($expected, $result); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php index 2b8c128c1..56083260a 100644 --- a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php +++ b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php @@ -278,19 +278,19 @@ class CakeEmailTest extends CakeTestCase { public function testFormatAddress() { $result = $this->CakeEmail->formatAddress(array('cake@cakephp.org' => 'cake@cakephp.org')); $expected = array('cake@cakephp.org'); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $this->CakeEmail->formatAddress(array('cake@cakephp.org' => 'cake@cakephp.org', 'php@cakephp.org' => 'php@cakephp.org')); $expected = array('cake@cakephp.org', 'php@cakephp.org'); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $this->CakeEmail->formatAddress(array('cake@cakephp.org' => 'CakePHP', 'php@cakephp.org' => 'Cake')); $expected = array('CakePHP ', 'Cake '); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $this->CakeEmail->formatAddress(array('cake@cakephp.org' => 'ÄÖÜTest')); $expected = array('=?UTF-8?B?w4TDlsOcVGVzdA==?= '); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } /** @@ -771,7 +771,7 @@ class CakeEmailTest extends CakeTestCase { 'non commodo odio. Morbi nibh nisi, vehicula pellentesque accumsan amet.', '' ); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $text = 'Lorem ipsum dolor sit amet, consectetur < adipiscing elit. Donec ac turpis orci, non commodo odio. Morbi nibh nisi, vehicula > pellentesque accumsan amet.'; $result = $this->CakeEmail->wrap($text); @@ -781,7 +781,7 @@ class CakeEmailTest extends CakeTestCase { 'amet.', '' ); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $text = '

Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Donec ac turpis orci, non commodo odio.
Morbi nibh nisi, vehicula pellentesque accumsan amet.


'; $result = $this->CakeEmail->wrap($text); @@ -791,7 +791,7 @@ class CakeEmailTest extends CakeTestCase { 'pellentesque accumsan amet.

', '' ); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac turpis orci, non commodo odio. Morbi nibh nisi, vehicula pellentesque accumsan amet.'; $result = $this->CakeEmail->wrap($text); @@ -801,7 +801,7 @@ class CakeEmailTest extends CakeTestCase { 'nisi, vehicula pellentesque accumsan amet.', '' ); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $text = 'Lorem ipsum ok'; $result = $this->CakeEmail->wrap($text); @@ -811,7 +811,7 @@ class CakeEmailTest extends CakeTestCase { 'ok', '' ); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $text = 'Lorem ipsum withonewordverybigMorethanthelineshouldsizeofrfcspecificationbyieeeavailableonieeesite ok.'; $result = $this->CakeEmail->wrap($text); @@ -821,7 +821,7 @@ class CakeEmailTest extends CakeTestCase { 'ok.', '' ); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); } } diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index 94a312efc..edeee52c1 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -1263,7 +1263,7 @@ class DispatcherTest extends CakeTestCase { $Dispatcher->asset('test_plugin/root.js'); $result = ob_get_clean(); $expected = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'root.js'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); ob_start(); $Dispatcher->dispatch(new CakeRequest('test_plugin/flash/plugin_test.swf')); @@ -1304,13 +1304,13 @@ class DispatcherTest extends CakeTestCase { $Dispatcher->asset('plugin_js/js/plugin_js.js'); $result = ob_get_clean(); $expected = "alert('win sauce');"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); ob_start(); $Dispatcher->asset('plugin_js/js/one/plugin_one.js'); $result = ob_get_clean(); $expected = "alert('plugin one nested js file');"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); ob_start(); $Dispatcher->asset('test_plugin/css/unknown.extension'); @@ -1406,7 +1406,7 @@ class DispatcherTest extends CakeTestCase { $cached = preg_replace('//', '', $cached); $expected = str_replace(array("\t", "\r\n", "\n"), "", $cached); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $filename = $this->__cachePath($request->here); unlink($filename); @@ -1428,7 +1428,7 @@ class DispatcherTest extends CakeTestCase { $cached = preg_replace('//', '', $cached); $expected = str_replace(array("\t", "\r\n", "\n"), "", $cached); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $filename = $this->__cachePath($request->here); unlink($filename); @@ -1446,7 +1446,7 @@ class DispatcherTest extends CakeTestCase { $cached = preg_replace('//', '', $cached); $expected = str_replace(array("\t", "\r\n", "\n"), "", $cached); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $filename = $this->__cachePath($request->here); unlink($filename); @@ -1464,7 +1464,7 @@ class DispatcherTest extends CakeTestCase { $cached = preg_replace('//', '', $cached); $expected = str_replace(array("\t", "\r\n", "\n"), "", $cached); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $filename = $this->__cachePath($request->here); unlink($filename); @@ -1482,7 +1482,7 @@ class DispatcherTest extends CakeTestCase { $cached = preg_replace('//', '', $cached); $expected = str_replace(array("\t", "\r\n", "\n"), "", $cached); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $filename = $this->__cachePath($request->here); unlink($filename); @@ -1500,7 +1500,7 @@ class DispatcherTest extends CakeTestCase { $cached = preg_replace('//', '', $cached); $expected = str_replace(array("\t", "\r\n", "\n"), "", $cached); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $filename = $this->__cachePath($request->here); $this->assertTrue(file_exists($filename)); diff --git a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php index 0eec8b3dd..3b726e8ad 100644 --- a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php +++ b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php @@ -43,7 +43,7 @@ class CakeRouteTestCase extends CakeTestCase { $route = new CakeRoute('/', array('controller' => 'pages', 'action' => 'display', 'home')); $result = $route->compile(); $expected = '#^/*$#'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertEqual($route->keys, array()); $route = new CakeRoute('/:controller/:action', array('controller' => 'posts')); @@ -178,7 +178,7 @@ class CakeRouteTestCase extends CakeTestCase { $this->assertEqual($result['month'], '08'); $this->assertEqual($result['day'], '01'); $this->assertEquals($result['pass'][0], 'title-of-post'); - + $route = new CakeRoute( "/:extra/page/:slug/*", @@ -287,7 +287,7 @@ class CakeRouteTestCase extends CakeTestCase { $url = array('controller' => 'subscribe', 'admin' => true, 'action' => 'edit', 1); $result = $route->match($url); $expected = '/admin/subscriptions/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -486,8 +486,8 @@ class CakeRouteTestCase extends CakeTestCase { */ function testPatternOnAction() { $route = new CakeRoute( - '/blog/:action/*', - array('controller' => 'blog_posts'), + '/blog/:action/*', + array('controller' => 'blog_posts'), array('action' => 'other|actions') ); $result = $route->match(array('controller' => 'blog_posts', 'action' => 'foo')); @@ -646,7 +646,7 @@ class CakeRouteTestCase extends CakeTestCase { ), 'pass' => array(), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $route->parse('/tests/action/theanswer[is]:42/var[]:val2/var[]:val3'); $expected = array( @@ -663,7 +663,7 @@ class CakeRouteTestCase extends CakeTestCase { ), 'pass' => array(), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $route->parse('/tests/action/theanswer[is][not]:42/theanswer[]:5/theanswer[is]:6'); $expected = array( @@ -680,7 +680,7 @@ class CakeRouteTestCase extends CakeTestCase { ), 'pass' => array(), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -702,4 +702,4 @@ class CakeRouteTestCase extends CakeTestCase { ); $this->assertEquals($expected, $result, 'Slug should have moved'); } -} \ No newline at end of file +} diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index a0af84d71..2f00a8de0 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -159,27 +159,27 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'posts', 'action' => 'index', '[method]' => 'GET')); $expected = '/posts'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', 'action' => 'view', '[method]' => 'GET', 'id' => 10)); $expected = '/posts/10'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', 'action' => 'add', '[method]' => 'POST')); $expected = '/posts'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', 'action' => 'edit', '[method]' => 'PUT', 'id' => 10)); $expected = '/posts/10'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', 'action' => 'delete', '[method]' => 'DELETE', 'id' => 10)); $expected = '/posts/10'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', 'action' => 'edit', '[method]' => 'POST', 'id' => 10)); $expected = '/posts/10'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -192,16 +192,16 @@ class RouterTest extends CakeTestCase { $expected = '/users/logout'; $result = Router::normalize('/users/logout/'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::normalize('//users//logout//'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::normalize('users/logout'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::normalize(array('controller' => 'users', 'action' => 'logout')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::normalize('/'); $this->assertEqual($result, '/'); @@ -284,7 +284,7 @@ class RouterTest extends CakeTestCase { Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display')); $result = Router::url(array('controller' => 'pages', 'action' => 'display', 'about')); $expected = '/pages/about'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/:plugin/:id/*', array('controller' => 'posts', 'action' => 'view'), array('id' => $ID)); @@ -292,11 +292,11 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => 'cake_plugin', 'controller' => 'posts', 'action' => 'view', 'id' => '1')); $expected = '/cake_plugin/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('plugin' => 'cake_plugin', 'controller' => 'posts', 'action' => 'view', 'id' => '1', '0')); $expected = '/cake_plugin/1/0'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/:controller/:action/:id', array(), array('id' => $ID)); @@ -304,7 +304,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'posts', 'action' => 'view', 'id' => '1')); $expected = '/posts/view/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/:controller/:id', array('action' => 'view')); @@ -312,17 +312,17 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'posts', 'action' => 'view', 'id' => '1')); $expected = '/posts/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', 'action' => 'index', '0')); $expected = '/posts/index/0'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::connect('/view/*', array('controller' => 'posts', 'action' => 'view')); Router::promote(); $result = Router::url(array('controller' => 'posts', 'action' => 'view', '1')); $expected = '/view/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); $request = new CakeRequest(); @@ -339,11 +339,11 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'real_controller_name', 'page' => '1')); $expected = '/short_controller_name/index/page:1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'add')); $expected = '/short_controller_name/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::parse('/'); @@ -358,7 +358,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('action' => 'login')); $expected = '/users/login'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/page/*', array('plugin' => null, 'controller' => 'pages', 'action' => 'view')); @@ -366,7 +366,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => 'my_plugin', 'controller' => 'pages', 'action' => 'view', 'my-page')); $expected = '/my_plugin/pages/view/my-page'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/contact/:action', array('plugin' => 'contact', 'controller' => 'contact')); @@ -375,7 +375,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => 'contact', 'controller' => 'contact', 'action' => 'me')); $expected = '/contact/me'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); $request = new CakeRequest(); @@ -389,7 +389,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => null, 'controller' => 'myothercontroller')); $expected = '/myothercontroller'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -402,7 +402,7 @@ class RouterTest extends CakeTestCase { 1, 2, 3 ))); $expected = '/tests/index/pages[0]:1/pages[1]:2/pages[2]:3'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'tests', 'pages' => array( @@ -414,7 +414,7 @@ class RouterTest extends CakeTestCase { ) )); $expected = '/tests/index/pages[param1][0]:one/pages[param1][1]:two/pages[0]:three'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'tests', 'pages' => array( @@ -426,7 +426,7 @@ class RouterTest extends CakeTestCase { ) )); $expected = '/tests/index/pages[param1][one]:1/pages[param1][two]:2/pages[0]:three'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'tests', 'super' => array( @@ -438,14 +438,14 @@ class RouterTest extends CakeTestCase { ) )); $expected = '/tests/index/super[nested][array]:awesome/super[nested][something]:else/super[0]:cool'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'tests', 'namedParam' => array( 'keyed' => 'is an array', 'test' ))); $expected = '/tests/index/namedParam[keyed]:is an array/namedParam[0]:test'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); //@todo Delete from here down, tests are in CakeRoute now. $result = Router::parse('/tests/action/var[]:val1/var[]:val2'); @@ -461,7 +461,7 @@ class RouterTest extends CakeTestCase { 'pass' => array(), 'plugin' => null ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/tests/action/theanswer[is]:42/var[]:val2/var[]:val3'); $expected = array( @@ -479,7 +479,7 @@ class RouterTest extends CakeTestCase { 'pass' => array(), 'plugin' => null ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/tests/action/theanswer[is][not]:42/theanswer[]:5/theanswer[is]:6'); $expected = array( @@ -497,7 +497,7 @@ class RouterTest extends CakeTestCase { 'pass' => array(), 'plugin' => null ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -508,20 +508,20 @@ class RouterTest extends CakeTestCase { function testUrlGenerationWithQueryStrings() { $result = Router::url(array('controller' => 'posts', 'action'=>'index', '0', '?' => 'var=test&var2=test2')); $expected = '/posts/index/0?var=test&var2=test2'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', '0', '?' => 'var=test&var2=test2')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', '0', '?' => array('var' => 'test', 'var2' => 'test2'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', '0', '?' => array('var' => null))); $this->assertEqual($result, '/posts/index/0'); $result = Router::url(array('controller' => 'posts', '0', '?' => 'var=test&var2=test2', '#' => 'unencoded string %')); $expected = '/posts/index/0?var=test&var2=test2#unencoded+string+%25'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -549,11 +549,11 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('admin' => false, 'language' => 'dan', 'action' => 'index', 'controller' => 'galleries')); $expected = '/dan/galleries'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('admin' => false, 'language' => 'eng', 'action' => 'index', 'controller' => 'galleries')); $expected = '/eng/galleries'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/:language/pages', @@ -564,14 +564,14 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('language' => 'eng', 'action' => 'index', 'controller' => 'pages')); $expected = '/eng/pages'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('language' => 'eng', 'controller' => 'pages')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('language' => 'eng', 'controller' => 'pages', 'action' => 'add')); $expected = '/eng/pages/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/forestillinger/:month/:year/*', @@ -582,7 +582,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => 'shows', 'controller' => 'shows', 'action' => 'calendar', 'month' => 10, 'year' => 2007, 'min-forestilling')); $expected = '/forestillinger/10/2007/min-forestilling'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/kalender/:month/:year/*', @@ -594,11 +594,11 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => 'shows', 'controller' => 'shows', 'action' => 'calendar', 'min-forestilling')); $expected = '/kalender/min-forestilling'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('plugin' => 'shows', 'controller' => 'shows', 'action' => 'calendar', 'year' => 2007, 'month' => 10, 'min-forestilling')); $expected = '/kalender/10/2007/min-forestilling'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/:controller/:action/*', array(), array( @@ -608,7 +608,7 @@ class RouterTest extends CakeTestCase { Router::defaults(false); $result = Router::parse('/foo/bar'); $expected = array('pass' => array(), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -642,7 +642,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('page' => 2)); $expected = '/admin/registrations/index/page:2'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); $request = new CakeRequest(); @@ -678,11 +678,11 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('action' => 'edit', 1)); $expected = '/magazine/admin/subscriptions/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('admin' => true, 'controller' => 'users', 'action' => 'login')); $expected = '/magazine/admin/users/login'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); @@ -701,7 +701,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('admin' => true, 'controller' => 'pages', 'action' => 'view', 'my-page')); $expected = '/page/my-page'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); @@ -718,7 +718,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => null, 'controller' => 'pages', 'action' => 'add', 'id' => false)); $expected = '/admin/pages/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); @@ -735,7 +735,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => null, 'controller' => 'pages', 'action' => 'add', 'id' => false)); $expected = '/admin/pages/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/admin/:controller/:action/:id', array('admin' => true), array('id' => '[0-9]+')); @@ -753,7 +753,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => null, 'controller' => 'pages', 'action' => 'edit', 'id' => '284')); $expected = '/admin/pages/edit/284'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); @@ -771,7 +771,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => null, 'controller' => 'pages', 'action' => 'add', 'id' => false)); $expected = '/admin/pages/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); @@ -789,7 +789,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => null, 'controller' => 'pages', 'action' => 'edit', 284)); $expected = '/admin/pages/edit/284'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); @@ -806,7 +806,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('all')); $expected = '/admin/posts/all'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -819,19 +819,19 @@ class RouterTest extends CakeTestCase { Router::parse('/'); $result = Router::url(array('plugin' => null, 'controller' => 'articles', 'action' => 'add', 'id' => null, 'ext' => 'json')); $expected = '/articles/add.json'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('plugin' => null, 'controller' => 'articles', 'action' => 'add', 'ext' => 'json')); $expected = '/articles/add.json'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('plugin' => null, 'controller' => 'articles', 'action' => 'index', 'id' => null, 'ext' => 'json')); $expected = '/articles.json'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('plugin' => null, 'controller' => 'articles', 'action' => 'index', 'ext' => 'json')); $expected = '/articles.json'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -873,7 +873,7 @@ class RouterTest extends CakeTestCase { 'controller' => 'shows', 'action' => 'index', 'page' => '1', )); $expected = '/en/shows/shows/page:1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -929,42 +929,42 @@ class RouterTest extends CakeTestCase { Router::connect('/posts/:value/:somevalue/:othervalue/*', array('controller' => 'posts', 'action' => 'view'), array('value','somevalue', 'othervalue')); $result = Router::parse('/posts/2007/08/01/title-of-post-here'); $expected = array('value' => '2007', 'somevalue' => '08', 'othervalue' => '01', 'controller' => 'posts', 'action' => 'view', 'plugin' =>'', 'pass' => array('0' => 'title-of-post-here'), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/:year/:month/:day/*', array('controller' => 'posts', 'action' => 'view'), array('year' => $Year, 'month' => $Month, 'day' => $Day)); $result = Router::parse('/posts/2007/08/01/title-of-post-here'); $expected = array('year' => '2007', 'month' => '08', 'day' => '01', 'controller' => 'posts', 'action' => 'view', 'plugin' =>'', 'pass' => array('0' => 'title-of-post-here'), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/:day/:year/:month/*', array('controller' => 'posts', 'action' => 'view'), array('year' => $Year, 'month' => $Month, 'day' => $Day)); $result = Router::parse('/posts/01/2007/08/title-of-post-here'); $expected = array('day' => '01', 'year' => '2007', 'month' => '08', 'controller' => 'posts', 'action' => 'view', 'plugin' =>'', 'pass' => array('0' => 'title-of-post-here'), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/:month/:day/:year/*', array('controller' => 'posts', 'action' => 'view'), array('year' => $Year, 'month' => $Month, 'day' => $Day)); $result = Router::parse('/posts/08/01/2007/title-of-post-here'); $expected = array('month' => '08', 'day' => '01', 'year' => '2007', 'controller' => 'posts', 'action' => 'view', 'plugin' =>'', 'pass' => array('0' => 'title-of-post-here'), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/:year/:month/:day/*', array('controller' => 'posts', 'action' => 'view')); $result = Router::parse('/posts/2007/08/01/title-of-post-here'); $expected = array('year' => '2007', 'month' => '08', 'day' => '01', 'controller' => 'posts', 'action' => 'view', 'plugin' =>'', 'pass' => array('0' => 'title-of-post-here'), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); $result = Router::parse('/pages/display/home'); $expected = array('plugin' => null, 'pass' => array('home'), 'controller' => 'pages', 'action' => 'display', 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('pages/display/home/'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('pages/display/home'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/page/*', array('controller' => 'test')); @@ -975,7 +975,7 @@ class RouterTest extends CakeTestCase { Router::connect('/:language/contact', array('language' => 'eng', 'plugin' => 'contact', 'controller' => 'contact', 'action' => 'index'), array('language' => '[a-z]{3}')); $result = Router::parse('/eng/contact'); $expected = array('pass' => array(), 'named' => array(), 'language' => 'eng', 'plugin' => 'contact', 'controller' => 'contact', 'action' => 'index'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/forestillinger/:month/:year/*', @@ -985,54 +985,54 @@ class RouterTest extends CakeTestCase { $result = Router::parse('/forestillinger/10/2007/min-forestilling'); $expected = array('pass' => array('min-forestilling'), 'plugin' => 'shows', 'controller' => 'shows', 'action' => 'calendar', 'year' => 2007, 'month' => 10, 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/:controller/:action/*'); Router::connect('/', array('plugin' => 'pages', 'controller' => 'pages', 'action' => 'display')); $result = Router::parse('/'); $expected = array('pass' => array(), 'named' => array(), 'controller' => 'pages', 'action' => 'display', 'plugin' => 'pages'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/posts/edit/0'); $expected = array('pass' => array(0), 'named' => array(), 'controller' => 'posts', 'action' => 'edit', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/:id::url_title', array('controller' => 'posts', 'action' => 'view'), array('pass' => array('id', 'url_title'), 'id' => '[\d]+')); $result = Router::parse('/posts/5:sample-post-title'); $expected = array('pass' => array('5', 'sample-post-title'), 'named' => array(), 'id' => 5, 'url_title' => 'sample-post-title', 'plugin' => null, 'controller' => 'posts', 'action' => 'view'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/:id::url_title/*', array('controller' => 'posts', 'action' => 'view'), array('pass' => array('id', 'url_title'), 'id' => '[\d]+')); $result = Router::parse('/posts/5:sample-post-title/other/params/4'); $expected = array('pass' => array('5', 'sample-post-title', 'other', 'params', '4'), 'named' => array(), 'id' => 5, 'url_title' => 'sample-post-title', 'plugin' => null, 'controller' => 'posts', 'action' => 'view'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/:url_title-(uuid::id)', array('controller' => 'posts', 'action' => 'view'), array('pass' => array('id', 'url_title'), 'id' => $UUID)); $result = Router::parse('/posts/sample-post-title-(uuid:47fc97a9-019c-41d1-a058-1fa3cbdd56cb)'); $expected = array('pass' => array('47fc97a9-019c-41d1-a058-1fa3cbdd56cb', 'sample-post-title'), 'named' => array(), 'id' => '47fc97a9-019c-41d1-a058-1fa3cbdd56cb', 'url_title' => 'sample-post-title', 'plugin' => null, 'controller' => 'posts', 'action' => 'view'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/view/*', array('controller' => 'posts', 'action' => 'view'), array('named' => false)); $result = Router::parse('/posts/view/foo:bar/routing:fun'); $expected = array('pass' => array('foo:bar', 'routing:fun'), 'named' => array(), 'plugin' => null, 'controller' => 'posts', 'action' => 'view'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/view/*', array('controller' => 'posts', 'action' => 'view'), array('named' => array('foo', 'answer'))); $result = Router::parse('/posts/view/foo:bar/routing:fun/answer:42'); $expected = array('pass' => array('routing:fun'), 'named' => array('foo' => 'bar', 'answer' => '42'), 'plugin' => null, 'controller' => 'posts', 'action' => 'view'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/posts/view/*', array('controller' => 'posts', 'action' => 'view'), array('named' => array('foo', 'answer'), 'greedyNamed' => true)); $result = Router::parse('/posts/view/foo:bar/routing:fun/answer:42'); $expected = array('pass' => array(), 'named' => array('foo' => 'bar', 'routing' => 'fun', 'answer' => '42'), 'plugin' => null, 'controller' => 'posts', 'action' => 'view'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1074,27 +1074,27 @@ class RouterTest extends CakeTestCase { ); $expected = '/en/red/posts/view/6'; $result = Router::url(array('controller' => 'posts', 'action' => 'view', 6)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = '/en/blue/posts/index'; $result = Router::url(array('controller' => 'posts', 'action' => 'index', 'color' => 'blue')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = '/posts/edit/6'; $result = Router::url(array('controller' => 'posts', 'action' => 'edit', 6, 'color' => null, 'lang' => null)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = '/posts'; $result = Router::url(array('controller' => 'posts', 'action' => 'index')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = '/posts/edit/7'; $result = Router::url(array('controller' => 'posts', 'action' => 'edit', 7)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected = '/about'; $result = Router::url(array('controller' => 'pages', 'action' => 'view', 'about')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1111,7 +1111,7 @@ class RouterTest extends CakeTestCase { ); $result = Router::parse('/subjects/add/4795d601-19c8-49a6-930e-06a8b01d17b7'); $expected = array('pass' => array(), 'named' => array(), 'category_id' => '4795d601-19c8-49a6-930e-06a8b01d17b7', 'plugin' => null, 'controller' => 'subjects', 'action' => 'add'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1129,11 +1129,11 @@ class RouterTest extends CakeTestCase { $result = Router::parse('/some_extra/page/this_is_the_slug'); $expected = array('pass' => array(), 'named' => array(), 'plugin' => null, 'controller' => 'pages', 'action' => 'view', 'slug' => 'this_is_the_slug', 'extra' => 'some_extra'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/page/this_is_the_slug'); $expected = array('pass' => array(), 'named' => array(), 'plugin' => null, 'controller' => 'pages', 'action' => 'view', 'slug' => 'this_is_the_slug', 'extra' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect( @@ -1145,11 +1145,11 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('admin' => null, 'plugin' => null, 'controller' => 'pages', 'action' => 'view', 'slug' => 'this_is_the_slug', 'extra' => null)); $expected = '/page/this_is_the_slug'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('admin' => null, 'plugin' => null, 'controller' => 'pages', 'action' => 'view', 'slug' => 'this_is_the_slug', 'extra' => 'some_extra')); $expected = '/some_extra/page/this_is_the_slug'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1165,13 +1165,13 @@ class RouterTest extends CakeTestCase { Router::reload(); $result = Router::prefixes(); $expected = array('admin', 'member', 'super_user'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Configure::write('Routing.prefixes', array('admin', 'member')); Router::reload(); $result = Router::prefixes(); $expected = array('admin', 'member'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Configure::write('Routing', $restore); } @@ -1207,7 +1207,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('plugin' => 'test_plugin', 'controller' => 'test_plugin', 'action' => 'index')); $expected = '/admin/test_plugin'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::parse('/'); @@ -1229,13 +1229,13 @@ class RouterTest extends CakeTestCase { 'admin' => true, 'prefix' => 'admin' )); $expected = '/admin/test_plugin/show_tickets/edit/6'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array( 'plugin' => 'test_plugin', 'controller' => 'show_tickets', 'action' => 'index', 'admin' => true )); $expected = '/admin/test_plugin/show_tickets'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); App::build(array('plugins' => $paths)); } @@ -1264,42 +1264,42 @@ class RouterTest extends CakeTestCase { $result = Router::parse('/posts.rss'); $expected = array('plugin' => null, 'controller' => 'posts', 'action' => 'index', 'url' => array('ext' => 'rss'), 'pass'=> array(), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/posts/view/1.rss'); $expected = array('plugin' => null, 'controller' => 'posts', 'action' => 'view', 'pass' => array('1'), 'named' => array(), 'url' => array('ext' => 'rss'), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/posts/view/1.rss?query=test'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/posts/view/1.atom'); $expected['url'] = array('ext' => 'atom'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::parseExtensions('rss', 'xml'); $result = Router::parse('/posts.xml'); $expected = array('plugin' => null, 'controller' => 'posts', 'action' => 'index', 'url' => array('ext' => 'xml'), 'pass'=> array(), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/posts.atom?hello=goodbye'); $expected = array('plugin' => null, 'controller' => 'posts.atom', 'action' => 'index', 'pass' => array(), 'named' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/controller/action', array('controller' => 'controller', 'action' => 'action', 'url' => array('ext' => 'rss'))); $result = Router::parse('/controller/action'); $expected = array('controller' => 'controller', 'action' => 'action', 'plugin' => null, 'url' => array('ext' => 'rss'), 'named' => array(), 'pass' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::parseExtensions('rss'); Router::connect('/controller/action', array('controller' => 'controller', 'action' => 'action', 'url' => array('ext' => 'rss'))); $result = Router::parse('/controller/action'); $expected = array('controller' => 'controller', 'action' => 'action', 'plugin' => null, 'url' => array('ext' => 'rss'), 'named' => array(), 'pass' => array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1311,25 +1311,25 @@ class RouterTest extends CakeTestCase { function testQuerystringGeneration() { $result = Router::url(array('controller' => 'posts', 'action'=>'index', '0', '?' => 'var=test&var2=test2')); $expected = '/posts/index/0?var=test&var2=test2'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', 'action'=>'index', '0', '?' => array('var' => 'test', 'var2' => 'test2'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $expected .= '&more=test+data'; $result = Router::url(array('controller' => 'posts', 'action'=>'index', '0', '?' => array('var' => 'test', 'var2' => 'test2', 'more' => 'test data'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); // Test bug #4614 $restore = ini_get('arg_separator.output'); ini_set('arg_separator.output', '&'); $result = Router::url(array('controller' => 'posts', 'action'=>'index', '0', '?' => array('var' => 'test', 'var2' => 'test2', 'more' => 'test data'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); ini_set('arg_separator.output', $restore); $result = Router::url(array('controller' => 'posts', 'action'=>'index', '0', '?' => array('var' => 'test', 'var2' => 'test2')), array('escape' => true)); $expected = '/posts/index/0?var=test&var2=test2'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1348,14 +1348,14 @@ class RouterTest extends CakeTestCase { Router::connectNamed(array(), array('separator' => '=')); $result = Router::parse('/foo/param1=value1/param2=value2'); $expected = array('pass' => array(), 'named' => array('param1' => 'value1', 'param2' => 'value2'), 'controller' => 'bar', 'action' => 'fubar', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/controller/action/*', array('controller' => 'controller', 'action' => 'action'), array('named' => array('param1' => 'value[\d]'))); Router::connectNamed(array(), array('greedy' => false, 'separator' => '=')); $result = Router::parse('/controller/action/param1=value1/param2=value2'); $expected = array('pass' => array('param2=value2'), 'named' => array('param1' => 'value1'), 'controller' => 'controller', 'action' => 'action', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/:controller/:action/*'); @@ -1373,11 +1373,11 @@ class RouterTest extends CakeTestCase { function testNamedArgsUrlGeneration() { $result = Router::url(array('controller' => 'posts', 'action' => 'index', 'published' => 1, 'deleted' => 1)); $expected = '/posts/index/published:1/deleted:1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'posts', 'action' => 'index', 'published' => 0, 'deleted' => 0)); $expected = '/posts/index/published:0/deleted:0'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); extract(Router::getNamedExpressions()); @@ -1387,11 +1387,11 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'graphs', 'action' => 'view', 'id' => 12, 'file' => 'asdf.png')); $expected = '/12/file:asdf.png'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'graphs', 'action' => 'view', 12, 'file' => 'asdf.foo')); $expected = '/graphs/view/12/file:asdf.foo'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Configure::write('Routing.prefixes', array('admin')); @@ -1410,7 +1410,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('page' => 1, 0 => null, 'sort' => 'controller', 'direction' => 'asc', 'order' => null)); $expected = "/admin/controller/index/page:1/sort:controller/direction:asc"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); $request = new CakeRequest('admin/controller/index'); @@ -1423,7 +1423,7 @@ class RouterTest extends CakeTestCase { $result = Router::parse('/admin/controller/index/type:whatever'); $result = Router::url(array('type'=> 'new')); $expected = "/admin/controller/index/type:new"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1436,7 +1436,7 @@ class RouterTest extends CakeTestCase { Router::reload(); $result = Router::parse('/controller/action/param1:value1:1/param2:value2:3/param:value'); $expected = array('pass' => array(), 'named' => array('param1' => 'value1:1', 'param2' => 'value2:3', 'param' => 'value'), 'controller' => 'controller', 'action' => 'action', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); $result = Router::connectNamed(false); @@ -1444,7 +1444,7 @@ class RouterTest extends CakeTestCase { $this->assertFalse($result['greedyNamed']); $result = Router::parse('/controller/action/param1:value1:1/param2:value2:3/param:value'); $expected = array('pass' => array('param1:value1:1', 'param2:value2:3', 'param:value'), 'named' => array(), 'controller' => 'controller', 'action' => 'action', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); $result = Router::connectNamed(true); @@ -1455,36 +1455,36 @@ class RouterTest extends CakeTestCase { Router::connectNamed(array('param1' => 'not-matching')); $result = Router::parse('/controller/action/param1:value1:1/param2:value2:3/param:value'); $expected = array('pass' => array('param1:value1:1'), 'named' => array('param2' => 'value2:3', 'param' => 'value'), 'controller' => 'controller', 'action' => 'action', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); //@todo delete this test. Router::reload(); Router::connect('/foo/:action/*', array('controller' => 'bar'), array('named' => array('param1' => array('action' => 'index')), 'greedyNamed' => true)); $result = Router::parse('/foo/index/param1:value1:1/param2:value2:3/param:value'); $expected = array('pass' => array(), 'named' => array('param1' => 'value1:1', 'param2' => 'value2:3', 'param' => 'value'), 'controller' => 'bar', 'action' => 'index', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/foo/view/param1:value1:1/param2:value2:3/param:value'); $expected = array('pass' => array('param1:value1:1'), 'named' => array('param2' => 'value2:3', 'param' => 'value'), 'controller' => 'bar', 'action' => 'view', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connectNamed(array('param1' => '[\d]', 'param2' => '[a-z]', 'param3' => '[\d]')); $result = Router::parse('/controller/action/param1:1/param2:2/param3:3'); $expected = array('pass' => array('param2:2'), 'named' => array('param1' => '1', 'param3' => '3'), 'controller' => 'controller', 'action' => 'action', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connectNamed(array('param1' => '[\d]', 'param2' => true, 'param3' => '[\d]')); $result = Router::parse('/controller/action/param1:1/param2:2/param3:3'); $expected = array('pass' => array(), 'named' => array('param1' => '1', 'param2' => '2', 'param3' => '3'), 'controller' => 'controller', 'action' => 'action', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connectNamed(array('param1' => 'value[\d]+:[\d]+'), array('greedy' => false)); $result = Router::parse('/controller/action/param1:value1:1/param2:value2:3/param3:value'); $expected = array('pass' => array('param2:value2:3', 'param3:value'), 'named' => array('param1' => 'value1:1'), 'controller' => 'controller', 'action' => 'action', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); //@todo delete this test. Router::reload(); @@ -1492,7 +1492,7 @@ class RouterTest extends CakeTestCase { Router::connectNamed(array(), array('greedy' => false)); $result = Router::parse('/foo/param1:value1:1/param2:value2:3/param3:value'); $expected = array('pass' => array('param2:value2:3', 'param3:value'), 'named' => array('param1' => 'value1:1'), 'controller' => 'bar', 'action' => 'fubar', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1525,7 +1525,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('protected' => true)); $expected = '/protected/images/index'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'images', 'action' => 'add')); $expected = '/images/add'; @@ -1533,40 +1533,40 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'images', 'action' => 'add', 'protected' => true)); $expected = '/protected/images/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'edit', 1)); $expected = '/images/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'edit', 1, 'protected' => true)); $expected = '/protected/images/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'protected_edit', 1, 'protected' => true)); $expected = '/protected/images/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'edit', 1, 'protected' => true)); $expected = '/protected/images/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'others', 'action' => 'edit', 1)); $expected = '/others/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true)); $expected = '/protected/others/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true, 'page' => 1)); $expected = '/protected/others/edit/1/page:1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::connectNamed(array('random')); $result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true, 'random' => 'my-value')); $expected = '/protected/others/edit/1/random:my-value'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1593,48 +1593,48 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'images', 'action' => 'add')); $expected = '/images/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'images', 'action' => 'add', 'protected' => true)); $expected = '/protected/images/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'edit', 1)); $expected = '/images/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'edit', 1, 'protected' => true)); $expected = '/protected/images/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'protected_edit', 1, 'protected' => true)); $expected = '/protected/images/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'protectededit', 1, 'protected' => true)); $expected = '/protected/images/protectededit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'edit', 1, 'protected' => true)); $expected = '/protected/images/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'others', 'action' => 'edit', 1)); $expected = '/others/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true)); $expected = '/protected/others/edit/1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true, 'page' => 1)); $expected = '/protected/others/edit/1/page:1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::connectNamed(array('random')); $result = Router::url(array('controller' => 'others', 'action' => 'edit', 1, 'protected' => true, 'random' => 'my-value')); $expected = '/protected/others/edit/1/random:my-value'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1661,11 +1661,11 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'images', 'action' => 'add')); $expected = '/protected/images/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'images', 'action' => 'add', 'protected' => false)); $expected = '/images/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1692,7 +1692,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'images', 'action' => 'add', 'admin' => true)); $expected = '/admin/images/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $request = new CakeRequest(); Router::setRequestInfo( @@ -1707,7 +1707,7 @@ class RouterTest extends CakeTestCase { ); $result = Router::url(array('controller' => 'images', 'action' => 'add', 'protected' => true)); $expected = '/protected/images/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1731,15 +1731,15 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'my_controller', 'action' => 'my_action')); $expected = '/base/my_controller/my_action'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'my_controller', 'action' => 'my_action', 'base' => false)); $expected = '/my_controller/my_action'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'my_controller', 'action' => 'my_action', 'base' => true)); $expected = '/base/my_controller/my_action/base:1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1754,37 +1754,37 @@ class RouterTest extends CakeTestCase { $result = Router::parse('/'); $expected = array('pass'=> array('home'), 'named' => array(), 'plugin' => null, 'controller' => 'pages', 'action' => 'display'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/pages/home/'); $expected = array('pass' => array('home'), 'named' => array(), 'plugin' => null, 'controller' => 'pages', 'action' => 'display'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); $result = Router::parse('/pages/display/home/parameter:value'); $expected = array('pass' => array('home'), 'named' => array('parameter' => 'value'), 'plugin' => null, 'controller' => 'pages', 'action' => 'display'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home')); $result = Router::parse('/'); $expected = array('pass' => array('home'), 'named' => array(), 'plugin' => null, 'controller' => 'pages', 'action' => 'display'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/pages/display/home/event:value'); $expected = array('pass' => array('home'), 'named' => array('event' => 'value'), 'plugin' => null, 'controller' => 'pages', 'action' => 'display'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/pages/display/home/event:Val_u2'); $expected = array('pass' => array('home'), 'named' => array('event' => 'Val_u2'), 'plugin' => null, 'controller' => 'pages', 'action' => 'display'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/pages/display/home/event:val-ue'); $expected = array('pass' => array('home'), 'named' => array('event' => 'val-ue'), 'plugin' => null, 'controller' => 'pages', 'action' => 'display'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/', array('controller' => 'posts', 'action' => 'index')); @@ -1792,7 +1792,7 @@ class RouterTest extends CakeTestCase { $result = Router::parse('/pages/contact/'); $expected = array('pass'=>array('contact'), 'named' => array(), 'plugin'=> null, 'controller'=>'pages', 'action'=>'display'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1889,18 +1889,18 @@ class RouterTest extends CakeTestCase { $result = Router::parse('/admin/posts/'); $expected = array('pass' => array(), 'named' => array(), 'prefix' => 'admin', 'plugin' => null, 'controller' => 'posts', 'action' => 'admin_index', 'admin' => true); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/admin/posts'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('admin' => true, 'controller' => 'posts')); $expected = '/base/admin/posts'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::prefixes(); $expected = array('admin'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); @@ -1923,19 +1923,19 @@ class RouterTest extends CakeTestCase { $result = Router::parse('/members/posts/index'); $expected = array('pass' => array(), 'named' => array(), 'prefix' => 'members', 'plugin' => null, 'controller' => 'posts', 'action' => 'members_index', 'members' => true); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('members' => true, 'controller' => 'posts', 'action' =>'index', 'page' => 2)); $expected = '/base/members/posts/index/page:2'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('members' => true, 'controller' => 'users', 'action' => 'add')); $expected = '/base/members/users/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/posts/index'); $expected = array('pass' => array(), 'named' => array(), 'plugin' => null, 'controller' => 'posts', 'action' => 'index'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1950,11 +1950,11 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'users', 'action' => 'login', 'company' => true)); $expected = '/company/users/login'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'users', 'action' => 'company_login', 'company' => true)); $expected = '/company/users/login'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $request = new CakeRequest(); Router::setRequestInfo( @@ -1970,7 +1970,7 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'users', 'action' => 'login', 'company' => false)); $expected = '/login'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2018,15 +2018,15 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('controller' => 'pages', 'action' => 'display', 1, 'whatever')); $expected = '/test/whatever'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'pages', 'action' => 'display', 2, 'whatever')); $expected = '/test2/whatever'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('controller' => 'pages', 'action' => 'display', 'home', 'whatever')); $expected = '/test-passed/whatever'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Configure::write('Routing.prefixes', array('admin')); Router::reload(); @@ -2052,11 +2052,11 @@ class RouterTest extends CakeTestCase { Router::parse('/'); $result = Router::url(array('controller' => 'images', 'action' => 'add')); $expected = '/protected/images/add'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::prefixes(); $expected = array('admin', 'protected'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2070,15 +2070,15 @@ class RouterTest extends CakeTestCase { $result = Router::parse('/test/test_action'); $expected = array('pass' => array(), 'named' => array(), 'controller' => 'test', 'action' => 'test_action', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/eng/test/test_action'); $expected = array('pass' => array(), 'named' => array(), 'locale' => 'eng', 'controller' => 'test', 'action' => 'test_action', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::parse('/badness/test/test_action'); $expected = array('pass' => array('test_action'), 'named' => array(), 'controller' => 'badness', 'action' => 'test', 'plugin' => null); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Router::reload(); Router::connect('/:locale/:controller/:action/*', array(), array('locale' => 'dan|eng')); @@ -2097,15 +2097,15 @@ class RouterTest extends CakeTestCase { $result = Router::url(array('action' => 'test_another_action')); $expected = '/test/test_another_action'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'test_another_action', 'locale' => 'eng')); $expected = '/eng/test/test_another_action'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('action' => 'test_another_action', 'locale' => 'badness')); $expected = '/test/test_another_action/locale:badness'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2225,7 +2225,7 @@ class RouterTest extends CakeTestCase { 'plugin' => 'plugin_js', 'controller' => 'js_file', 'action' => 'index', 'named' => array(), 'pass' => array() ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Router::url(array('plugin' => 'test_plugin', 'controller' => 'test_plugin', 'action' => 'index')); $this->assertEqual($result, '/test_plugin'); @@ -2236,7 +2236,7 @@ class RouterTest extends CakeTestCase { 'named' => array(), 'pass' => array() ); - $this->assertEqual($result, $expected, 'Plugin shortcut route broken. %s'); + $this->assertEqual($expected, $result, 'Plugin shortcut route broken. %s'); } /** @@ -2257,7 +2257,7 @@ class RouterTest extends CakeTestCase { ->method('parse') ->will($this->returnValue($expected)); $result = Router::parse('/test'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index 22a3ec152..cf05d2bbb 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -279,7 +279,7 @@ class ControllerTestCaseTest extends CakeTestCase { $result = $this->Case->testAction('/tests_apps/index.json', array('return' => 'view')); $result = json_decode($result, true); $expected = array('cakephp' => 'cool'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php'; $result = $this->Case->testAction('/some_alias'); diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index c9127ba71..453263ff2 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -250,7 +250,7 @@ class DebuggerTest extends CakeTestCase { $result = str_replace(array("\t", "\r\n", "\n"), "", $result); $expected = str_replace(array("\t", "\r\n", "\n"), "", $expected); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Utility/FolderTest.php b/lib/Cake/Test/Case/Utility/FolderTest.php index 67dec0869..8ef91c957 100644 --- a/lib/Cake/Test/Case/Utility/FolderTest.php +++ b/lib/Cake/Test/Case/Utility/FolderTest.php @@ -41,11 +41,11 @@ class FolderTest extends CakeTestCase { $result = Folder::addPathElement($path, 'test'); $expected = $path . DS . 'test'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Folder->cd(ROOT); $expected = ROOT; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $Folder->cd(ROOT . DS . 'non-existent'); $this->assertFalse($result); @@ -303,7 +303,7 @@ class FolderTest extends CakeTestCase { $Folder->path = TMP . DS . 'non-existent'; $expected = array(array(), array()); $result = $Folder->read(true, true); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -348,11 +348,11 @@ class FolderTest extends CakeTestCase { $result = $Folder->tree(CAKE . 'Config', false, 'dir'); $this->assertIdentical(array_diff($expected[0], $result), array()); - $this->assertIdentical(array_diff($result, $expected[0]), array()); + $this->assertIdentical(array_diff($expected, $result[0]), array()); $result = $Folder->tree(CAKE . 'Config', false, 'files'); $this->assertIdentical(array_diff($expected[1], $result), array()); - $this->assertIdentical(array_diff($result, $expected[1]), array()); + $this->assertIdentical(array_diff($expected, $result[1]), array()); } /** @@ -490,28 +490,28 @@ class FolderTest extends CakeTestCase { $result = $Folder->find(); $expected = array('config.php'); $this->assertIdentical(array_diff($expected, $result), array()); - $this->assertIdentical(array_diff($result, $expected), array()); + $this->assertIdentical(array_diff($expected, $result), array()); $result = $Folder->find('.*', true); $expected = array('config.php'); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $Folder->find('.*\.php'); $expected = array('config.php'); $this->assertIdentical(array_diff($expected, $result), array()); - $this->assertIdentical(array_diff($result, $expected), array()); + $this->assertIdentical(array_diff($expected, $result), array()); $result = $Folder->find('.*\.php', true); $expected = array('config.php'); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $Folder->find('.*ig\.php'); $expected = array('config.php'); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $result = $Folder->find('config\.php'); $expected = array('config.php'); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $Folder->cd(TMP); $file = new File($Folder->pwd() . DS . 'paths.php', true); @@ -519,12 +519,12 @@ class FolderTest extends CakeTestCase { $Folder->cd('testme'); $result = $Folder->find('paths\.php'); $expected = array(); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $Folder->cd($Folder->pwd() . '/..'); $result = $Folder->find('paths\.php'); $expected = array('paths.php'); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $Folder->cd(TMP); $Folder->delete($Folder->pwd() . DS . 'testme'); @@ -545,13 +545,13 @@ class FolderTest extends CakeTestCase { CAKE . 'Config' . DS . 'config.php' ); $this->assertIdentical(array_diff($expected, $result), array()); - $this->assertIdentical(array_diff($result, $expected), array()); + $this->assertIdentical(array_diff($expected, $result), array()); $result = $Folder->findRecursive('(config|paths)\.php', true); $expected = array( CAKE . 'Config' . DS . 'config.php' ); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $Folder->cd(TMP); $Folder->create($Folder->pwd() . DS . 'testme'); @@ -561,7 +561,7 @@ class FolderTest extends CakeTestCase { $Folder->cd(TMP . 'sessions'); $result = $Folder->findRecursive('paths\.php'); $expected = array(); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $Folder->cd(TMP . 'testme'); $File = new File($Folder->pwd() . DS . 'my.php'); @@ -574,14 +574,14 @@ class FolderTest extends CakeTestCase { TMP . 'testme' . DS . 'paths.php' ); $this->assertIdentical(array_diff($expected, $result), array()); - $this->assertIdentical(array_diff($result, $expected), array()); + $this->assertIdentical(array_diff($expected, $result), array()); $result = $Folder->findRecursive('(paths|my)\.php', true); $expected = array( TMP . 'testme' . DS . 'my.php', TMP . 'testme' . DS . 'paths.php' ); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $Folder->cd(CAKE . 'Config'); $Folder->cd(TMP); diff --git a/lib/Cake/Test/Case/Utility/InflectorTest.php b/lib/Cake/Test/Case/Utility/InflectorTest.php index e2b301e1b..8fe380b4a 100644 --- a/lib/Cake/Test/Case/Utility/InflectorTest.php +++ b/lib/Cake/Test/Case/Utility/InflectorTest.php @@ -166,59 +166,59 @@ class InflectorTest extends CakeTestCase { function testInflectorSlug() { $result = Inflector::slug('Foo Bar: Not just for breakfast any-more'); $expected = 'Foo_Bar_Not_just_for_breakfast_any_more'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('this/is/a/path'); $expected = 'this_is_a_path'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('Foo Bar: Not just for breakfast any-more', "-"); $expected = 'Foo-Bar-Not-just-for-breakfast-any-more'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('Foo Bar: Not just for breakfast any-more', "+"); $expected = 'Foo+Bar+Not+just+for+breakfast+any+more'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('Äpfel Über Öl grün ärgert groß öko', '-'); $expected = 'Aepfel-Ueber-Oel-gruen-aergert-gross-oeko'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('The truth - and- more- news', '-'); $expected = 'The-truth-and-more-news'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('The truth: and more news', '-'); $expected = 'The-truth-and-more-news'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('La langue française est un attribut de souveraineté en France', '-'); $expected = 'La-langue-francaise-est-un-attribut-de-souverainete-en-France'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('!@$#exciting stuff! - what !@-# was that?', '-'); $expected = 'exciting-stuff-what-was-that'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('20% of profits went to me!', '-'); $expected = '20-of-profits-went-to-me'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('#this melts your face1#2#3', '-'); $expected = 'this-melts-your-face1-2-3'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('controller/action/りんご/1'); $expected = 'controller_action_りんご_1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('の話が出たので大丈夫かなあと'); $expected = 'の話が出たので大丈夫かなあと'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('posts/view/한국어/page:1/sort:asc'); $expected = 'posts_view_한국어_page_1_sort_asc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -231,11 +231,11 @@ class InflectorTest extends CakeTestCase { Inflector::rules('transliteration', array('/r/' => '1')); $result = Inflector::slug('replace every r'); $expected = '1eplace_eve1y_1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Inflector::slug('replace every r', '_'); $expected = '1eplace_eve1y_1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -248,7 +248,7 @@ class InflectorTest extends CakeTestCase { Inflector::rules('transliteration', array('/å/' => 'aa', '/ø/' => 'oe')); $result = Inflector::slug('Testing æ ø å', '-'); $expected = 'Testing-ae-oe-aa'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Utility/SanitizeTest.php b/lib/Cake/Test/Case/Utility/SanitizeTest.php index 3bff7768d..a27e7d472 100644 --- a/lib/Cake/Test/Case/Utility/SanitizeTest.php +++ b/lib/Cake/Test/Case/Utility/SanitizeTest.php @@ -131,47 +131,47 @@ class SanitizeTest extends CakeTestCase { $string = 'test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line'; $expected = 'test & "quote" 'other' ;.$ symbol.another line'; $result = Sanitize::clean($string, array('connection' => 'test')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line'; $expected = 'test & ' . Sanitize::escape('"quote"', 'test') . ' ' . Sanitize::escape('\'other\'', 'test') . ' ;.$ symbol.another line'; $result = Sanitize::clean($string, array('encode' => false, 'connection' => 'test')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line'; $expected = 'test & "quote" \'other\' ;.$ $ symbol.another line'; $result = Sanitize::clean($string, array('encode' => false, 'escape' => false, 'connection' => 'test')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line'; $expected = 'test & "quote" \'other\' ;.$ \\$ symbol.another line'; $result = Sanitize::clean($string, array('encode' => false, 'escape' => false, 'dollar' => false, 'connection' => 'test')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line'; $expected = 'test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line'; $result = Sanitize::clean($string, array('encode' => false, 'escape' => false, 'carriage' => false, 'connection' => 'test')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $array = array(array('test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line')); $expected = array(array('test & "quote" 'other' ;.$ symbol.another line')); $result = Sanitize::clean($array, array('connection' => 'test')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $array = array(array('test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line')); $expected = array(array('test & "quote" \'other\' ;.$ $ symbol.another line')); $result = Sanitize::clean($array, array('encode' => false, 'escape' => false, 'connection' => 'test')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $array = array(array('test odd Ä spacesé')); $expected = array(array('test odd Ä spacesé')); $result = Sanitize::clean($array, array('odd_spaces' => false, 'escape' => false, 'connection' => 'test')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $array = array(array('\\$', array('key' => 'test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line'))); $expected = array(array('$', array('key' => 'test & "quote" \'other\' ;.$ $ symbol.another line'))); $result = Sanitize::clean($array, array('encode' => false, 'escape' => false)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; @@ -212,36 +212,36 @@ class SanitizeTest extends CakeTestCase { $string = '

This is a test string & so is this

'; $expected = 'This is a test string & so is this'; $result = Sanitize::html($string, array('remove' => true)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'The "lazy" dog \'jumped\' & flew over the moon. If (1+1) = 2 is true, (2-1) = 1 is also true'; $expected = 'The "lazy" dog 'jumped' & flew over the moon. If (1+1) = 2 <em>is</em> true, (2-1) = 1 is also true'; $result = Sanitize::html($string); - $this->assertEqual($result, $expected); - + $this->assertEqual($expected, $result); + $string = 'The "lazy" dog \'jumped\''; $expected = 'The "lazy" dog \'jumped\''; $result = Sanitize::html($string, array('quotes' => ENT_COMPAT)); - $this->assertEqual($result, $expected); - + $this->assertEqual($expected, $result); + $string = 'The "lazy" dog \'jumped\''; $result = Sanitize::html($string, array('quotes' => ENT_NOQUOTES)); $this->assertEqual($result, $string); - + $string = 'The "lazy" dog \'jumped\' & flew over the moon. If (1+1) = 2 is true, (2-1) = 1 is also true'; $expected = 'The "lazy" dog 'jumped' & flew over the moon. If (1+1) = 2 <em>is</em> true, (2-1) = 1 is also true'; $result = Sanitize::html($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'The "lazy" dog & his friend Apple® conquered the world'; $expected = 'The "lazy" dog & his friend Apple&reg; conquered the world'; $result = Sanitize::html($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'The "lazy" dog & his friend Apple® conquered the world'; $expected = 'The "lazy" dog & his friend Apple® conquered the world'; $result = Sanitize::html($string, array('double' => false)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -254,7 +254,7 @@ class SanitizeTest extends CakeTestCase { $string = "This sentence \t\t\t has lots of \n\n white\nspace \rthat \r\n needs to be \t \n trimmed."; $expected = "This sentence has lots of whitespace that needs to be trimmed."; $result = Sanitize::stripWhitespace($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -267,7 +267,7 @@ class SanitizeTest extends CakeTestCase { $string = 'I would like to !%@#% & dance & sing ^$&*()-+'; $expected = 'Iwouldliketodancesing'; $result = Sanitize::paranoid($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = array('This |s th% s0ng that never ends it g*es', 'on and on my friends, b^ca#use it is the', @@ -276,27 +276,27 @@ class SanitizeTest extends CakeTestCase { 'on and on my friends bcause it is the', 'sog tht never ends.'); $result = Sanitize::paranoid($string, array('%', '*', '.', ' ')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = "anything' OR 1 = 1"; $expected = 'anythingOR11'; $result = Sanitize::paranoid($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = "x' AND email IS NULL; --"; $expected = 'xANDemailISNULL'; $result = Sanitize::paranoid($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = "x' AND 1=(SELECT COUNT(*) FROM users); --"; $expected = "xAND1SELECTCOUNTFROMusers"; $result = Sanitize::paranoid($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = "x'; DROP TABLE members; --"; $expected = "xDROPTABLEmembers"; $result = Sanitize::paranoid($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -309,22 +309,22 @@ class SanitizeTest extends CakeTestCase { $string = 'my image'; $expected = 'my image
'; $result = Sanitize::stripImages($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; $result = Sanitize::stripImages($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'test image alt'; $expected = 'test image alt
'; $result = Sanitize::stripImages($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; $result = Sanitize::stripImages($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -337,50 +337,50 @@ class SanitizeTest extends CakeTestCase { $string = ''; $expected = ''; $result = Sanitize::stripScripts($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '' . "\n" . '' . "\n" . '' . "\n" . ''; $expected = "\n" . '' . "\n" . ''."\n".''; $result = Sanitize::stripScripts($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; $result = Sanitize::stripScripts($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; $result = Sanitize::stripScripts($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; $result = Sanitize::stripScripts($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; $result = Sanitize::stripScripts($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = << - text HTML; $expected = "text\n\ntext"; $result = Sanitize::stripScripts($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = << - @@ -388,7 +388,7 @@ text HTML; $expected = "text\n\ntext"; $result = Sanitize::stripScripts($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -401,17 +401,17 @@ HTML; $string = '"/>'; $expected ='"/>'; $result = Sanitize::stripAll($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; $result = Sanitize::stripAll($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '<'; $expected = '<'; $result = Sanitize::stripAll($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''."\n". "

This is ok \t\n text

\n". @@ -419,7 +419,7 @@ HTML; ''; $expected = '

This is ok text

'; $result = Sanitize::stripAll($string); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } @@ -433,37 +433,37 @@ HTML; $string = '

Headline

My Link could go to a bad site

'; $expected = 'Headline

My Link could go to a bad site

'; $result = Sanitize::stripTags($string, 'h2', 'a'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ' '; $result = Sanitize::stripTags($string, 'script'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '

Important

Additional information here . Read even more here

'; $expected = 'Important

Additional information here . Read even more here

'; $result = Sanitize::stripTags($string, 'h2', 'a'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '

Important

Additional information here . Read even more here

'; $expected = 'Important

Additional information here . Read even more here

'; $result = Sanitize::stripTags($string, 'h2', 'a', 'img'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Important message!
This message will self destruct!'; $expected = 'Important message!
This message will self destruct!'; $result = Sanitize::stripTags($string, 'b'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'Important message!
This message will self destruct!'; $expected = 'Important message!
This message will self destruct!'; $result = Sanitize::stripTags($string, 'b'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '

Important

Additional information here . Read even more here

'; $expected = 'Important

Additional information here . Read even more here

'; $result = Sanitize::stripTags($string, 'h2', 'a', 'img'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -494,7 +494,7 @@ HTML; )); Sanitize::formatColumns($this->DataTest); $result = $this->DataTest->data; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Article = new SanitizeArticle(array('alias' => 'Article')); $data = array('Article' => array( @@ -514,6 +514,6 @@ HTML; )); Sanitize::formatColumns($this->Article); $result = $this->Article->data; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/Utility/SetTest.php b/lib/Cake/Test/Case/Utility/SetTest.php index 233ad7a4f..ddf6fa5ea 100644 --- a/lib/Cake/Test/Case/Utility/SetTest.php +++ b/lib/Cake/Test/Case/Utility/SetTest.php @@ -88,7 +88,7 @@ class SetTest extends CakeTestCase { function testFilter() { $result = Set::filter(array('0', false, true, 0, array('one thing', 'I can tell you', 'is you got to be', false))); $expected = array('0', 2 => true, 3 => 0, 4 => array('one thing', 'I can tell you', 'is you got to be')); - $this->assertSame($result, $expected); + $this->assertSame($expected, $result); $result = Set::filter(array(1, array(false))); $expected = array(1); @@ -369,7 +369,7 @@ class SetTest extends CakeTestCase { array('employees' => array(array('name' => array()))), array('employees' => array(array('name' => array()))) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -956,8 +956,8 @@ class SetTest extends CakeTestCase { ); $result = Set::extract('/ParentNode/name', $hasMany); $expected = array('Second'); - $this->assertEqual($result, $expected); - + $this->assertEqual($expected, $result); + $data = array( array( 'Category' => array( @@ -990,7 +990,7 @@ class SetTest extends CakeTestCase { ) ); $result = Set::extract('/Category[id=1]/..', $data); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1198,14 +1198,14 @@ class SetTest extends CakeTestCase { $expected = array(1, 2, 3); $r = Set::extract('/User/id', $nonZero); $this->assertEqual($r, $expected); - + $expected = array( array('User' => array('id' => 1, 'name' => 'John')), array('User' => array('id' => 2, 'name' => 'Bob')), array('User' => array('id' => 3, 'name' => 'Tony')), ); $result = Set::extract('/User', $nonZero); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $nonSequential = array( 'User' => array( @@ -1231,13 +1231,13 @@ class SetTest extends CakeTestCase { $this->assertEqual(Set::extract('/User/id', $nonSequential), $expected); $result = Set::extract('/User/id', $nonZero); - $this->assertEqual($result, $expected, 'Failed non zero array key extract'); + $this->assertEqual($expected, $result, 'Failed non zero array key extract'); $expected = array(1, 2, 3, 4, 5); $this->assertEqual(Set::extract('/User/id', $nonSequential), $expected); $result = Set::extract('/User/id', $nonZero); - $this->assertEqual($result, $expected, 'Failed non zero array key extract'); + $this->assertEqual($expected, $result, 'Failed non zero array key extract'); $startingAtOne = array( 'Article' => array( @@ -1250,7 +1250,7 @@ class SetTest extends CakeTestCase { $expected = array(0 => array('Article' => array('id' => 1, 'approved' => 1))); $result = Set::extract('/Article[approved=1]', $startingAtOne); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $items = array( 240 => array( @@ -1270,7 +1270,7 @@ class SetTest extends CakeTestCase { ); $result = Set::extract('/B/field1', $items); - $this->assertIdentical($result, $expected); + $this->assertIdentical($expected, $result); $this->assertIdentical($result, Set::extract('{n}.B.field1', $items)); } /** @@ -1307,7 +1307,7 @@ class SetTest extends CakeTestCase { array('node' => array('foo')), 'bar' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'node' => array( @@ -1320,7 +1320,7 @@ class SetTest extends CakeTestCase { array('foo' => array('bar')), array('bar' => array('foo')), ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $data = array( 'node' => array( @@ -1335,7 +1335,7 @@ class SetTest extends CakeTestCase { array('foo' => array('bar')), 'foo' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1447,19 +1447,19 @@ class SetTest extends CakeTestCase { $result = Set::extract($a, '{n}.Article.id'); $expected = array( 1, 2, 3 ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{n}.Article.title'); $expected = array( 'Article 1', 'Article 2', 'Article 3' ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '1.Article.title'); $expected = 'Article 2'; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '3.Article.title'); $expected = null; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array( array( @@ -1478,7 +1478,7 @@ class SetTest extends CakeTestCase { $result = Set::extract($a, '{n}.Article.User.username'); $expected = array( 'mariano.iglesias', 'mariano.iglesias', 'phpnut' ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array( array( @@ -1505,7 +1505,7 @@ class SetTest extends CakeTestCase { $result = Set::extract($a, '{n}.Article.Comment.{n}.id'); $expected = array (array(10, 11, 12), array(13, 14), null); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{n}.Article.Comment.{n}.title'); $expected = array( @@ -1513,12 +1513,12 @@ class SetTest extends CakeTestCase { array('Comment 13', 'Comment 14'), null ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array(array('1day' => '20 sales'), array('1day' => '2 sales')); $result = Set::extract($a, '{n}.1day'); $expected = array('20 sales', '2 sales'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array( 'pages' => array('name' => 'page'), @@ -1527,7 +1527,7 @@ class SetTest extends CakeTestCase { ); $result = Set::extract($a, '{s}.name'); $expected = array('page','fruit'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array( 0 => array('pages' => array('name' => 'page')), @@ -1538,11 +1538,11 @@ class SetTest extends CakeTestCase { $result = Set::extract($a, '{n}.{s}.name'); $expected = array(0 => array('page'), 1 => array('fruit')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{s}.{n}.name'); $expected = array(array('jippi'), array('jippi')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{\w+}.{\w+}.name'); $expected = array( @@ -1551,34 +1551,34 @@ class SetTest extends CakeTestCase { 'test' => array('jippi'), 'dot.test' => array('jippi') ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{\d+}.{\w+}.name'); $expected = array(array('pages' => 'page'), array('fruites' => 'fruit')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{n}.{\w+}.name'); $expected = array(array('pages' => 'page'), array('fruites' => 'fruit')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{s}.{\d+}.name'); $expected = array(array('jippi'), array('jippi')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{s}'); $expected = array(array(array('name' => 'jippi')), array(array('name' => 'jippi'))); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{[a-z]}'); $expected = array( 'test' => array(array('name' => 'jippi')), 'dot.test' => array(array('name' => 'jippi')) ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, '{dot\.test}.{n}'); $expected = array('dot.test' => array(array('name' => 'jippi'))); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = new stdClass(); $a->articles = array( @@ -1589,11 +1589,11 @@ class SetTest extends CakeTestCase { $result = Set::extract($a, 'articles.{n}.Article.id'); $expected = array(1, 2, 3); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::extract($a, 'articles.{n}.Article.title'); $expected = array('Article 1', 'Article 2', 'Article 3'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** @@ -1612,7 +1612,7 @@ class SetTest extends CakeTestCase { 'pages' => array('name' => 'page'), 'files' => array('name' => 'files') ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array( 'pages' => array('name' => 'page') @@ -1621,7 +1621,7 @@ class SetTest extends CakeTestCase { $expected = array( 'pages' => array('name' => array()), ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array( 'pages' => array( @@ -1637,7 +1637,7 @@ class SetTest extends CakeTestCase { 1 => array('name' => 'about', 'vars' => array('title' => 'page title')) ) ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** @@ -1656,7 +1656,7 @@ class SetTest extends CakeTestCase { $expected = array( 'pages' => array('name' => 'page') ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array( 'pages' => array( @@ -1672,11 +1672,11 @@ class SetTest extends CakeTestCase { 1 => array('name' => 'about') ) ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::remove($a, 'pages.2.vars', array('title' => 'page title')); $expected = $a; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** @@ -1741,15 +1741,15 @@ class SetTest extends CakeTestCase { $expected = array( 2 => array('name' => 'contact') ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::diff($a, array()); $expected = $a; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::diff(array(), $b); $expected = $b; - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $b = array( 0 => array('name' => 'me'), @@ -1760,7 +1760,7 @@ class SetTest extends CakeTestCase { $expected = array( 0 => array('name' => 'main') ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array(); $b = array('name' => 'bob', 'address' => 'home'); @@ -1777,31 +1777,31 @@ class SetTest extends CakeTestCase { $b = array('key' => 1, 'another' => 0); $expected = array('name' => 'me'); $result = Set::diff($a, $b); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array('key' => 'value', 'another' => null, 'name' => 'me'); $b = array('key' => 'differentValue', 'another' => null); $expected = array('key' => 'value', 'name' => 'me'); $result = Set::diff($a, $b); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array('key' => 'value', 'another' => null, 'name' => 'me'); $b = array('key' => 'differentValue', 'another' => 'value'); $expected = array('key' => 'value', 'another' => null, 'name' => 'me'); $result = Set::diff($a, $b); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array('key' => 'value', 'another' => null, 'name' => 'me'); $b = array('key' => 'differentValue', 'another' => 'value'); $expected = array('key' => 'differentValue', 'another' => 'value', 'name' => 'me'); $result = Set::diff($b, $a); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $a = array('key' => 'value', 'another' => null, 'name' => 'me'); $b = array(0 => 'differentValue', 1 => 'value'); $expected = $a + $b; $result = Set::diff($a, $b); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); } /** @@ -1848,25 +1848,25 @@ class SetTest extends CakeTestCase { 'Data' => array('user' => 'gwoo','name' => 'The Gwoo')))); $result = Set::combine($a, '{n}.User.id'); $expected = array(2 => null, 14 => null, 25 => null); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', '{n}.User.non-existant'); $expected = array(2 => null, 14 => null, 25 => null); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', '{n}.User.Data'); $expected = array( 2 => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'), 14 => array('user' => 'phpnut', 'name' => 'Larry E. Masters'), 25 => array('user' => 'gwoo', 'name' => 'The Gwoo')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', '{n}.User.Data.name'); $expected = array( 2 => 'Mariano Iglesias', 14 => 'Larry E. Masters', 25 => 'The Gwoo'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', '{n}.User.Data', '{n}.User.group_id'); $expected = array( @@ -1875,7 +1875,7 @@ class SetTest extends CakeTestCase { 25 => array('user' => 'gwoo', 'name' => 'The Gwoo')), 2 => array( 14 => array('user' => 'phpnut', 'name' => 'Larry E. Masters'))); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', '{n}.User.Data.name', '{n}.User.group_id'); $expected = array( @@ -1884,22 +1884,22 @@ class SetTest extends CakeTestCase { 25 => 'The Gwoo'), 2 => array( 14 => 'Larry E. Masters')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id'); $expected = array(2 => null, 14 => null, 25 => null); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', '{n}.User.Data'); $expected = array( 2 => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'), 14 => array('user' => 'phpnut', 'name' => 'Larry E. Masters'), 25 => array('user' => 'gwoo', 'name' => 'The Gwoo')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', '{n}.User.Data.name'); $expected = array(2 => 'Mariano Iglesias', 14 => 'Larry E. Masters', 25 => 'The Gwoo'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', '{n}.User.Data', '{n}.User.group_id'); $expected = array( @@ -1908,7 +1908,7 @@ class SetTest extends CakeTestCase { 25 => array('user' => 'gwoo', 'name' => 'The Gwoo')), 2 => array( 14 => array('user' => 'phpnut', 'name' => 'Larry E. Masters'))); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', '{n}.User.Data.name', '{n}.User.group_id'); $expected = array( @@ -1917,7 +1917,7 @@ class SetTest extends CakeTestCase { 25 => 'The Gwoo'), 2 => array( 14 => 'Larry E. Masters')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, '{n}.User.id', array('{0}: {1}', '{n}.User.Data.user', '{n}.User.Data.name'), '{n}.User.group_id'); $expected = array ( @@ -1925,23 +1925,23 @@ class SetTest extends CakeTestCase { 2 => 'mariano.iglesias: Mariano Iglesias', 25 => 'gwoo: The Gwoo'), 2 => array (14 => 'phpnut: Larry E. Masters')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, array('{0}: {1}', '{n}.User.Data.user', '{n}.User.Data.name'), '{n}.User.id'); $expected = array('mariano.iglesias: Mariano Iglesias' => 2, 'phpnut: Larry E. Masters' => 14, 'gwoo: The Gwoo' => 25); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, array('{1}: {0}', '{n}.User.Data.user', '{n}.User.Data.name'), '{n}.User.id'); $expected = array('Mariano Iglesias: mariano.iglesias' => 2, 'Larry E. Masters: phpnut' => 14, 'The Gwoo: gwoo' => 25); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, array('%1$s: %2$d', '{n}.User.Data.user', '{n}.User.id'), '{n}.User.Data.name'); $expected = array('mariano.iglesias: 2' => 'Mariano Iglesias', 'phpnut: 14' => 'Larry E. Masters', 'gwoo: 25' => 'The Gwoo'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, array('%2$d: %1$s', '{n}.User.Data.user', '{n}.User.id'), '{n}.User.Data.name'); $expected = array('2: mariano.iglesias' => 'Mariano Iglesias', '14: phpnut' => 'Larry E. Masters', '25: gwoo' => 'The Gwoo'); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $b = new stdClass(); $b->users = array( @@ -1953,11 +1953,11 @@ class SetTest extends CakeTestCase { 'Data' => array('user' => 'gwoo','name' => 'The Gwoo')))); $result = Set::combine($b, 'users.{n}.User.id'); $expected = array(2 => null, 14 => null, 25 => null); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($b, 'users.{n}.User.id', 'users.{n}.User.non-existant'); $expected = array(2 => null, 14 => null, 25 => null); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::combine($a, 'fail', 'fail'); $this->assertEqual($result, array()); @@ -1996,7 +1996,7 @@ class SetTest extends CakeTestCase { $this->assertEqual($map->Array2[0]->Array2Data1, $expected['Array2'][0]['Array2Data1']); $result = Set::reverse($map); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $expected = array( 'Post' => array('id'=> 1, 'title' => 'First Post'), @@ -2037,7 +2037,7 @@ class SetTest extends CakeTestCase { 4 => array('Array3Data1' => 5, 'Array3Data2' => 'Array3Data2 value 2', 'Array3Data3' => 'Array3Data3 value 2', 'Array3Data4' => 'Array3Data4 value 4'))); $map = Set::map($expected, true); $result = Set::reverse($map); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $expected = array( 'Array1' => array( @@ -2066,12 +2066,12 @@ class SetTest extends CakeTestCase { 'some3' => 'thing else'); $map = Set::map($expected, true); $result = Set::reverse($map); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $expected = array('User' => array('psword'=> 'whatever', 'Icon' => array('id'=> 851))); $map = Set::map($expected); $result = Set::reverse($map); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $expected = array('User' => array('psword'=> 'whatever', 'Icon' => array('id'=> 851))); $class = new stdClass; @@ -2080,7 +2080,7 @@ class SetTest extends CakeTestCase { $class->User->Icon = new stdClass; $class->User->Icon->id = 851; $result = Set::reverse($class); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $expected = array('User' => array('psword'=> 'whatever', 'Icon' => array('id'=> 851), 'Profile' => array('name' => 'Some Name', 'address' => 'Some Address'))); $class = new stdClass; @@ -2093,7 +2093,7 @@ class SetTest extends CakeTestCase { $class->User->Profile->address = 'Some Address'; $result = Set::reverse($class); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $expected = array('User' => array('psword'=> 'whatever', 'Icon' => array('id'=> 851), @@ -2129,7 +2129,7 @@ class SetTest extends CakeTestCase { $class->User->Comment->{'1'}->updated = '2007-03-18 10:49:31'; $result = Set::reverse($class); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $expected = array('User' => array('psword'=> 'whatever', 'Icon' => array('id'=> 851), @@ -2165,7 +2165,7 @@ class SetTest extends CakeTestCase { $comment2->updated = '2007-03-18 10:49:31'; $class->User->Comment = array($comment, $comment2); $result = Set::reverse($class); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $class = new stdClass; $class->User = new stdClass; @@ -2176,7 +2176,7 @@ class SetTest extends CakeTestCase { $result = Set::reverse($class); $expected = array('User' => array('id' => '100'), 'someString'=> 'this is some string', 'Profile' => array('name' => 'Joe Mamma')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $class = new stdClass; $class->User = new stdClass; @@ -2188,7 +2188,7 @@ class SetTest extends CakeTestCase { $result = Set::reverse($class); $expected = array('User' => array('id' => '100'), 'Profile' => array('name' => 'Joe Mamma')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2205,38 +2205,38 @@ class SetTest extends CakeTestCase { $result = Set::format($data, '{1}, {0}', array('{n}.Person.first_name', '{n}.Person.last_name')); $expected = array('Abele, Nate', 'Masters, Larry', 'Woodworth, Garrett'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::format($data, '{0}, {1}', array('{n}.Person.last_name', '{n}.Person.first_name')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::format($data, '{0}, {1}', array('{n}.Person.city', '{n}.Person.state')); $expected = array('Boston, MA', 'Boondock, TN', 'Venice Beach, CA'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::format($data, '{{0}, {1}}', array('{n}.Person.city', '{n}.Person.state')); $expected = array('{Boston, MA}', '{Boondock, TN}', '{Venice Beach, CA}'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::format($data, '{{0}, {1}}', array('{n}.Person.something', '{n}.Person.something')); $expected = array('{42, 42}', '{{0}, {0}}', '{{1}, {1}}'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::format($data, '{%2$d, %1$s}', array('{n}.Person.something', '{n}.Person.something')); $expected = array('{42, 42}', '{0, {0}}', '{0, {1}}'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::format($data, '{%1$s, %1$s}', array('{n}.Person.something', '{n}.Person.something')); $expected = array('{42, 42}', '{{0}, {0}}', '{{1}, {1}}'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::format($data, '%2$d, %1$s', array('{n}.Person.first_name', '{n}.Person.something')); $expected = array('42, Nate', '0, Larry', '0, Garrett'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::format($data, '%1$s, %2$d', array('{n}.Person.first_name', '{n}.Person.something')); $expected = array('Nate, 42', 'Larry, 0', 'Garrett, 0'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2368,7 +2368,7 @@ class SetTest extends CakeTestCase { $this->assertEqual(get_object_vars($mapped[0]->headers), $expected[0]['IndexedPage']['headers']); $result = Set::reverse($mapped); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $data = array( array( @@ -2416,7 +2416,7 @@ class SetTest extends CakeTestCase { $result = Set::map(null); $expected = null; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2686,7 +2686,7 @@ class SetTest extends CakeTestCase { $result = Set::pushDiff($array1, $array3); $expected = array('ModelOne' => array('id'=>1001, 'field_one'=>'a1.m1.f1', 'field_two'=>'a1.m1.f2', 'field_three'=>'a3.m1.f3')); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $array1 = array( @@ -2706,7 +2706,7 @@ class SetTest extends CakeTestCase { 0 => array('ModelOne' => array('id'=>1001, 'field_one'=>'s1.0.m1.f1', 'field_two'=>'s1.0.m1.f2'), 'ModelThree' => array('id'=>1003, 'field_one'=>'s3.0.m3.f1', 'field_two'=>'s3.0.m3.f2')), 1 => array('ModelTwo' => array('id'=>1002, 'field_one'=>'s1.1.m2.f2', 'field_two'=>'s1.1.m2.f2'))); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $result = Set::pushDiff($array1, null); $this->assertEquals($result, $array1); @@ -2730,28 +2730,28 @@ class SetTest extends CakeTestCase { $result = Set::apply('/Movie/rating', $data, 'array_sum'); $expected = 9; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::apply('/Movie/rating', $data, 'array_product'); $expected = 15; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::apply('/Movie/title', $data, 'ucfirst', array('type' => 'map')); $expected = array('Movie 3', 'Movie 1', 'Movie 2'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::apply('/Movie/title', $data, 'strtoupper', array('type' => 'map')); $expected = array('MOVIE 3', 'MOVIE 1', 'MOVIE 2'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::apply('/Movie/rating', $data, array('SetTest', '_method'), array('type' => 'reduce')); $expected = 9; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = Set::apply('/Movie/rating', $data, 'strtoupper', array('type' => 'non existing type')); $expected = null; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } @@ -2828,13 +2828,13 @@ class SetTest extends CakeTestCase { ) ) )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string =''; $xml = Xml::build($string); $result = Set::reverse($xml); $expected = array('data' => array('post' => array('@title' => 'Title of this post', '@description' => 'cool'))); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $xml = Xml::build('An example of a correctly reversed SimpleXMLElement'); $result = Set::reverse($xml); @@ -2846,7 +2846,7 @@ class SetTest extends CakeTestCase { ) ) ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $xml = Xml::build('title1title2'); $result = Set::reverse($xml); @@ -2860,7 +2860,7 @@ class SetTest extends CakeTestCase { ) ) ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $xml = Xml::build('listtextforitems'); $result = Set::reverse($xml); @@ -2874,7 +2874,7 @@ class SetTest extends CakeTestCase { ) ) ); - $this->assertEquals($result, $expected); + $this->assertEquals($expected, $result); $string = ' @@ -2942,7 +2942,7 @@ class SetTest extends CakeTestCase { ) ) )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $text = ' @@ -3005,7 +3005,7 @@ class SetTest extends CakeTestCase { ) ) )); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -3052,7 +3052,7 @@ class SetTest extends CakeTestCase { '1.Post.title' => 'Second Post', '1.Post.body' => 'Second Post Body', '1.Author.id' => '3', '1.Author.user' => 'larry', '1.Author.password' => null ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Utility/StringTest.php b/lib/Cake/Test/Case/Utility/StringTest.php index 4c7da882e..9ee7eea0c 100644 --- a/lib/Cake/Test/Case/Utility/StringTest.php +++ b/lib/Cake/Test/Case/Utility/StringTest.php @@ -68,124 +68,124 @@ class StringTest extends CakeTestCase { $string = 'some string'; $expected = 'some string'; $result = String::insert($string, array()); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '2 + 2 = :sum. Cake is :adjective.'; $expected = '2 + 2 = 4. Cake is yummy.'; $result = String::insert($string, array('sum' => '4', 'adjective' => 'yummy')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '2 + 2 = %sum. Cake is %adjective.'; $result = String::insert($string, array('sum' => '4', 'adjective' => 'yummy'), array('before' => '%')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '2 + 2 = 2sum2. Cake is 9adjective9.'; $result = String::insert($string, array('sum' => '4', 'adjective' => 'yummy'), array('format' => '/([\d])%s\\1/')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '2 + 2 = 12sum21. Cake is 23adjective45.'; $expected = '2 + 2 = 4. Cake is 23adjective45.'; $result = String::insert($string, array('sum' => '4', 'adjective' => 'yummy'), array('format' => '/([\d])([\d])%s\\2\\1/')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ':web :web_site'; $expected = 'www http'; $result = String::insert($string, array('web' => 'www', 'web_site' => 'http')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '2 + 2 = .'; $expected = '2 + 2 = '4', 'adjective' => 'yummy'), array('before' => '<', 'after' => '>')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '2 + 2 = \:sum. Cake is :adjective.'; $expected = '2 + 2 = :sum. Cake is yummy.'; $result = String::insert($string, array('sum' => '4', 'adjective' => 'yummy')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '2 + 2 = !:sum. Cake is :adjective.'; $result = String::insert($string, array('sum' => '4', 'adjective' => 'yummy'), array('escape' => '!')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '2 + 2 = \%sum. Cake is %adjective.'; $expected = '2 + 2 = %sum. Cake is yummy.'; $result = String::insert($string, array('sum' => '4', 'adjective' => 'yummy'), array('before' => '%')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ':a :b \:a :a'; $expected = '1 2 :a 1'; $result = String::insert($string, array('a' => 1, 'b' => 2)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ':a :b :c'; $expected = '2 3'; $result = String::insert($string, array('b' => 2, 'c' => 3), array('clean' => true)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ':a :b :c'; $expected = '1 3'; $result = String::insert($string, array('a' => 1, 'c' => 3), array('clean' => true)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ':a :b :c'; $expected = '2 3'; $result = String::insert($string, array('b' => 2, 'c' => 3), array('clean' => true)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ':a, :b and :c'; $expected = '2 and 3'; $result = String::insert($string, array('b' => 2, 'c' => 3), array('clean' => true)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '":a, :b and :c"'; $expected = '"1, 2"'; $result = String::insert($string, array('a' => 1, 'b' => 2), array('clean' => true)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = '"${a}, ${b} and ${c}"'; $expected = '"1, 2"'; $result = String::insert($string, array('a' => 1, 'b' => 2), array('before' => '${', 'after' => '}', 'clean' => true)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ':alt'; $expected = ''; $result = String::insert($string, array('src' => 'foo'), array('clean' => 'html')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; $result = String::insert($string, array('src' => 'foo'), array('clean' => 'html')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = ''; $expected = ''; $result = String::insert($string, array('src' => 'foo', 'extra' => 'bar'), array('clean' => 'html')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::insert("this is a ? string", "test"); $expected = "this is a test string"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::insert("this is a ? string with a ? ? ?", array('long', 'few?', 'params', 'you know')); $expected = "this is a long string with a few? params you know"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::insert('update saved_urls set url = :url where id = :id', array('url' => 'http://www.testurl.com/param1:url/param2:id','id' => 1)); $expected = "update saved_urls set url = http://www.testurl.com/param1:url/param2:id where id = 1"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::insert('update saved_urls set url = :url where id = :id', array('id' => 1, 'url' => 'http://www.testurl.com/param1:url/param2:id')); $expected = "update saved_urls set url = http://www.testurl.com/param1:url/param2:id where id = 1"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::insert(':me cake. :subject :verb fantastic.', array('me' => 'I :verb', 'subject' => 'cake', 'verb' => 'is')); $expected = "I :verb cake. cake is fantastic."; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::insert(':I.am: :not.yet: passing.', array('I.am' => 'We are'), array('before' => ':', 'after' => ':', 'clean' => array('replacement' => ' of course', 'method' => 'text'))); $expected = "We are of course passing."; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::insert( ':I.am: :not.yet: passing.', @@ -193,31 +193,31 @@ class StringTest extends CakeTestCase { array('before' => ':', 'after' => ':', 'clean' => true) ); $expected = "We are passing."; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::insert('?-pended result', array('Pre')); $expected = "Pre-pended result"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'switching :timeout / :timeout_count'; $expected = 'switching 5 / 10'; $result = String::insert($string, array('timeout' => 5, 'timeout_count' => 10)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'switching :timeout / :timeout_count'; $expected = 'switching 5 / 10'; $result = String::insert($string, array('timeout_count' => 10, 'timeout' => 5)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'switching :timeout_count by :timeout'; $expected = 'switching 10 by 5'; $result = String::insert($string, array('timeout' => 5, 'timeout_count' => 10)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $string = 'switching :timeout_count by :timeout'; $expected = 'switching 10 by 5'; $result = String::insert($string, array('timeout_count' => 10, 'timeout' => 5)); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -280,15 +280,15 @@ class StringTest extends CakeTestCase { function testTokenize() { $result = String::tokenize('A,(short,boring test)'); $expected = array('A', '(short,boring test)'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::tokenize('A,(short,more interesting( test)'); $expected = array('A', '(short,more interesting( test)'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::tokenize('A,(short,very interesting( test))'); $expected = array('A', '(short,very interesting( test))'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = String::tokenize('"single tag"', ' ', '"', '"'); $expected = array('"single tag"'); @@ -298,7 +298,7 @@ class StringTest extends CakeTestCase { $expected = array('tagA', '"single tag"', 'tagB'); $this->assertEqual($expected, $result); } - + function testReplaceWithQuestionMarkInString() { $string = ':a, :b and :c?'; $expected = '2 and 3?'; @@ -326,7 +326,7 @@ TEXT; This is the song th at never ends. This is the song that n -ever ends. This is +ever ends. This is the song that never ends. TEXT; diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 382e44efb..2cb52eb48 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -737,11 +737,11 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected,true); + $this->assertTags($expected, $result,true); $result = $this->Form->create('Contact', array('url' => '/contacts/add', 'id' => 'MyForm')); $expected['form']['id'] = 'MyForm'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -836,7 +836,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -899,7 +899,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -923,14 +923,14 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'name' => 'save', 'value' => 'Save'), '/div', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Cancel', array('name' => 'cancel')); $expected = array( 'div' => array('class' => 'submit'), 'input' => array('type' => 'submit', 'name' => 'cancel', 'value' => 'Cancel'), '/div', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->end(null); $expected = array( @@ -941,7 +941,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -988,7 +988,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1033,7 +1033,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1065,7 +1065,7 @@ class FormHelperTest extends CakeTestCase { 'Addresses.id' => '123456', 'Addresses.title', 'Addresses.last_name', 'Addresses.city', 'Addresses.phone' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Form->secure($expected); @@ -1078,7 +1078,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1119,7 +1119,7 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('UserForm.published', array('type' => 'text')); $expected = array( @@ -1133,7 +1133,7 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('UserForm.other', array('type' => 'text')); $expected = array( @@ -1147,21 +1147,21 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->hidden('UserForm.stuff'); $expected = array('input' => array( 'type' => 'hidden', 'name' => 'data[UserForm][stuff]', 'id' => 'UserFormStuff' )); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->hidden('UserForm.hidden', array('value' => '0')); $expected = array('input' => array( 'type' => 'hidden', 'name' => 'data[UserForm][hidden]', 'value' => '0', 'id' => 'UserFormHidden' )); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('UserForm.something', array('type' => 'checkbox')); $expected = array( @@ -1179,14 +1179,14 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->fields; $expected = array( 'UserForm.published', 'UserForm.other', 'UserForm.stuff' => '', 'UserForm.hidden' => '0', 'UserForm.something' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $hash = 'bd7c4a654e5361f9a433a43f488ff9a1065d0aaf%3AUserForm.hidden%7CUserForm.stuff'; @@ -1199,7 +1199,7 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1281,7 +1281,7 @@ class FormHelperTest extends CakeTestCase { $expected = array( 'Addresses.id' => '123456', 'Addresses.title', ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * testPasswordValidation method @@ -1308,7 +1308,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1343,7 +1343,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $expected = array('OpenidUrl' => array('openid_not_registered' => array(true))); $this->assertEqual($this->Form->validationErrors, $expected); @@ -1386,7 +1386,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $expected = array( 'ValidateUser' => array('email' => array(true)), @@ -1431,7 +1431,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $expected = array( 'ValidateUser' => array('email' => array(true)), @@ -1472,7 +1472,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1503,7 +1503,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Address.0.first_name'); $expected = array( @@ -1517,7 +1517,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Address.0.last_name'); $expected = array( @@ -1528,7 +1528,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'text', 'name', 'id'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Address.1.last_name'); $expected = array( @@ -1545,7 +1545,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1566,7 +1566,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('name', 'type' => 'text', 'maxlength' => 8, 'id'), '/div', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.email', array('id' => 'custom')); $expected = array( @@ -1580,7 +1580,7 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.email', array('div' => array('class' => false))); $expected = array( @@ -1594,14 +1594,14 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->hidden('Contact.idontexist'); $expected = array('input' => array( 'type' => 'hidden', 'name' => 'data[Contact][idontexist]', 'id' => 'ContactIdontexist' )); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.email', array('type' => 'text')); $expected = array( @@ -1615,7 +1615,7 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.5.email', array('type' => 'text')); $expected = array( @@ -1629,7 +1629,7 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.password'); $expected = array( @@ -1643,7 +1643,7 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.email', array( 'type' => 'file', 'class' => 'textbox' @@ -1659,7 +1659,7 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array('Contact' => array('phone' => 'Hello & World > weird chars')); $result = $this->Form->input('Contact.phone'); @@ -1675,7 +1675,7 @@ class FormHelperTest extends CakeTestCase { )), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['0']['OtherModel']['field'] = 'My value'; $result = $this->Form->input('Model.0.OtherModel.field', array('id' => 'myId')); @@ -1690,7 +1690,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); unset($this->Form->request->data); @@ -1710,7 +1710,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Model.field', array( 'div' => false, 'error' => array('attributes' => array('wrap' => 'span')) @@ -1727,7 +1727,7 @@ class FormHelperTest extends CakeTestCase { 'Badness!', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Model.field', array( 'div' => array('tag' => 'span'), 'error' => array('attributes' => array('wrap' => false)) @@ -1744,7 +1744,7 @@ class FormHelperTest extends CakeTestCase { 'Badness!', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Model.field', array('after' => 'A message to you, Rudy')); $expected = array( @@ -1762,7 +1762,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->setEntity(null); $this->Form->setEntity('Model.field'); @@ -1778,7 +1778,7 @@ class FormHelperTest extends CakeTestCase { 'A message to you, Rudy', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); unset($this->Form->validationErrors['Model']['field']); $result = $this->Form->input('Model.field', array('after' => 'A message to you, Rudy')); @@ -1791,7 +1791,7 @@ class FormHelperTest extends CakeTestCase { 'A message to you, Rudy', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->validationErrors['Model']['field'] = array('minLength'); $result = $this->Form->input('Model.field', array( @@ -1811,7 +1811,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->validationErrors['Model']['field'] = array('maxLength'); $result = $this->Form->input('Model.field', array( @@ -1832,7 +1832,7 @@ class FormHelperTest extends CakeTestCase { '/span', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1848,7 +1848,7 @@ class FormHelperTest extends CakeTestCase { array('input' => array('type' => 'checkbox', 'name' => 'data[User][active]', 'value' => '1', 'id' => 'UserActive', 'checked' => 'checked')), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('User.active', array('label' => false, 'checked' => 1)); $expected = array( @@ -1857,7 +1857,7 @@ class FormHelperTest extends CakeTestCase { array('input' => array('type' => 'checkbox', 'name' => 'data[User][active]', 'value' => '1', 'id' => 'UserActive', 'checked' => 'checked')), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('User.active', array('label' => false, 'checked' => '1')); $expected = array( @@ -1866,7 +1866,7 @@ class FormHelperTest extends CakeTestCase { array('input' => array('type' => 'checkbox', 'name' => 'data[User][active]', 'value' => '1', 'id' => 'UserActive', 'checked' => 'checked')), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1975,7 +1975,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array('Contact' => array('created' => null)); $result = $this->Form->input('Contact.created', array('type' => 'datetime', 'dateFormat' => 'NONE')); @@ -2010,7 +2010,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } } @@ -2024,7 +2024,7 @@ class FormHelperTest extends CakeTestCase { $expected = array( 'input' => array('name' => 'data[0][Node][title]', 'id' => '0NodeTitle', 'type' => 'text') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2053,7 +2053,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('email', array( 'options' => array('First', 'Second'), 'empty' => true) @@ -2075,7 +2075,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->View->viewVars['users'] = array('value' => 'good', 'other' => 'bad'); @@ -2099,7 +2099,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->View->viewVars['users'] = array('value' => 'good', 'other' => 'bad'); $this->Form->request->data = array('Model' => array('user_id' => null)); @@ -2122,7 +2122,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->View->viewVars['users'] = array('value' => 'good', 'other' => 'bad'); $this->Form->request->data = array('Model' => array('user_id' => 'value')); @@ -2145,7 +2145,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->View->viewVars['users'] = array('value' => 'good', 'other' => 'bad'); $this->Form->request->data = array('User' => array('User' => array('value'))); @@ -2168,7 +2168,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->data = array(); $result = $this->Form->input('Publisher.id', array( @@ -2197,7 +2197,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2220,7 +2220,7 @@ class FormHelperTest extends CakeTestCase { $expected = array( 'input' => array('type' => 'hidden', 'name' => 'data[User][model_id]', 'id' => 'UserModelId'), ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2237,7 +2237,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('name' => 'data[Model][user_id]', 'type' => 'text', 'id' => 'ModelUserId'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); //Check that magic types still work for plural/singular vars $this->View->viewVars['types'] = array('value' => 'good', 'other' => 'bad'); @@ -2251,7 +2251,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2289,7 +2289,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('name' => 'data[User][User]', 'type' => 'text', 'id' => 'UserUser', 'value' => 'ABC, Inc.'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2310,7 +2310,7 @@ class FormHelperTest extends CakeTestCase { '/legend', '*/fieldset', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->inputs(array('legend' => 'Field of Dreams', 'fieldset' => 'classy-stuff')); $expected = array( @@ -2320,7 +2320,7 @@ class FormHelperTest extends CakeTestCase { '/legend', '*/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->create('Contact'); $this->Form->request['prefix'] = 'admin'; @@ -2333,7 +2333,7 @@ class FormHelperTest extends CakeTestCase { '/legend', '*/fieldset', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->create('Contact'); $result = $this->Form->inputs(false); @@ -2356,7 +2356,7 @@ class FormHelperTest extends CakeTestCase { array('div' => array('class' => 'input select')), '*/div', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->create('Contact'); $result = $this->Form->inputs(array('fieldset' => false, 'legend' => false)); @@ -2379,7 +2379,7 @@ class FormHelperTest extends CakeTestCase { array('div' => array('class' => 'input select')), '*/div', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->create('Contact'); $result = $this->Form->inputs(array('fieldset' => true, 'legend' => false)); @@ -2404,7 +2404,7 @@ class FormHelperTest extends CakeTestCase { '*/div', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->create('Contact'); $result = $this->Form->inputs(array('fieldset' => false, 'legend' => 'Hello')); @@ -2427,7 +2427,7 @@ class FormHelperTest extends CakeTestCase { array('div' => array('class' => 'input select')), '*/div', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->create('Contact'); $result = $this->Form->inputs('Hello'); @@ -2455,7 +2455,7 @@ class FormHelperTest extends CakeTestCase { '*/div', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->create('Contact'); $result = $this->Form->inputs(array('legend' => 'Hello')); @@ -2483,7 +2483,7 @@ class FormHelperTest extends CakeTestCase { '*/div', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2517,7 +2517,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->select('Model.multi_field', array('1/2' => 'half'), array('multiple' => 'checkbox')); $expected = array( @@ -2529,7 +2529,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2600,7 +2600,7 @@ class FormHelperTest extends CakeTestCase { $expected = array( 'input' => array('type' => 'text', 'name' => 'data[Model][0][OtherModel][field]', 'value' => 'My value', 'id' => 'myId') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2690,7 +2690,7 @@ class FormHelperTest extends CakeTestCase { 'No good!', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->validationErrors['Model']['field'] = array('notEmpty', 'email', 'Something else'); $result = $this->Form->error('Model.field', array( @@ -2706,7 +2706,7 @@ class FormHelperTest extends CakeTestCase { '/ul', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); /** Testing error messages list options **/ $this->Form->validationErrors['Model']['field'] = array('notEmpty', 'email'); @@ -2720,7 +2720,7 @@ class FormHelperTest extends CakeTestCase { '/ol', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->error('Model.field', null, array('listOptions' => array('tag' => 'ol'))); $expected = array( @@ -2731,7 +2731,7 @@ class FormHelperTest extends CakeTestCase { '/ol', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->error('Model.field', null, array( 'listOptions' => array( @@ -2749,7 +2749,7 @@ class FormHelperTest extends CakeTestCase { '/ul', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2802,7 +2802,7 @@ class FormHelperTest extends CakeTestCase { 'option A', '/label' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.field', array('1/2' => 'half')); $expected = array( @@ -2812,7 +2812,7 @@ class FormHelperTest extends CakeTestCase { 'half', '/label' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.field', array('option A', 'option B')); $expected = array( @@ -2831,7 +2831,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.field', array('option A', 'option B'), array('separator' => '
')); $expected = array( @@ -2851,7 +2851,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.field', array('1' => 'Yes', '0' => 'No'), array('value' => '1')); $expected = array( @@ -2869,7 +2869,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.field', array('1' => 'Yes', '0' => 'No'), array('value' => '0')); $expected = array( @@ -2887,7 +2887,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.field', array('1' => 'Yes', '0' => 'No'), array('value' => null)); $expected = array( @@ -2906,7 +2906,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.field', array('1' => 'Yes', '0' => 'No')); $expected = array( @@ -2925,7 +2925,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Newsletter.subscribe', array('legend' => 'Legend title', 'type' => 'radio', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe'))); $expected = array( @@ -2946,7 +2946,7 @@ class FormHelperTest extends CakeTestCase { '/fieldset', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Newsletter.subscribe', array('legend' => false, 'type' => 'radio', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe'))); $expected = array( @@ -2962,7 +2962,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Newsletter.subscribe', array('legend' => 'Legend title', 'label' => false, 'type' => 'radio', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe'))); $expected = array( @@ -2979,7 +2979,7 @@ class FormHelperTest extends CakeTestCase { '/fieldset', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Newsletter.subscribe', array('legend' => false, 'label' => false, 'type' => 'radio', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe'))); $expected = array( @@ -2991,7 +2991,7 @@ class FormHelperTest extends CakeTestCase { 'Subscribe', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Newsletter.subscribe', array('legend' => false, 'label' => false, 'type' => 'radio', 'value' => '1', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe'))); $expected = array( @@ -3002,7 +3002,7 @@ class FormHelperTest extends CakeTestCase { 'Subscribe', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Employee.gender', array('male' => 'Male', 'female' => 'Female')); $expected = array( @@ -3021,7 +3021,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Officer.gender', array('male' => 'Male', 'female' => 'Female')); $expected = array( @@ -3040,7 +3040,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Contact.1.imrequired', array('option A')); $expected = array( @@ -3050,7 +3050,7 @@ class FormHelperTest extends CakeTestCase { 'option A', '/label' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.1.field', array('option A')); $expected = array( @@ -3060,7 +3060,7 @@ class FormHelperTest extends CakeTestCase { 'option A', '/label' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.field', array('option A', 'option B'), array('name' => 'data[Model][custom]')); @@ -3080,7 +3080,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3090,7 +3090,7 @@ class FormHelperTest extends CakeTestCase { */ function testRadioDisabled() { $result = $this->Form->radio( - 'Model.field', + 'Model.field', array('option A', 'option B'), array('disabled' => array('option A'), 'value' => 'option A') ); @@ -3109,7 +3109,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/fieldset' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3132,7 +3132,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->radio('Model.1.field', array('option A'), array('hiddenField' => false)); $expected = array( @@ -3141,7 +3141,7 @@ class FormHelperTest extends CakeTestCase { 'option A', '/label' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3160,7 +3160,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array('Model' => array('field' => 'value')); $result = $this->Form->select('Model.field', array('value' => 'good', 'other' => 'bad')); @@ -3176,7 +3176,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array(); $result = $this->Form->select('Model.field', array('value' => 'good', 'other' => 'bad')); @@ -3192,7 +3192,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->select( 'Model.field', array('first' => 'first "html" ', 'second' => 'value'), @@ -3208,7 +3208,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->select( 'Model.field', @@ -3225,7 +3225,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array('Model' => array('contact_id' => 228)); $result = $this->Form->select( @@ -3242,7 +3242,7 @@ class FormHelperTest extends CakeTestCase { array('option' => array('value' => '228-2')), '228-2 value', '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3266,7 +3266,7 @@ class FormHelperTest extends CakeTestCase { '/optgroup', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $options = array( '>< Key' => array( @@ -3283,7 +3283,7 @@ class FormHelperTest extends CakeTestCase { '/optgroup', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3304,7 +3304,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3341,7 +3341,7 @@ class FormHelperTest extends CakeTestCase { '/optgroup', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->select( 'Model.field', @@ -3367,7 +3367,7 @@ class FormHelperTest extends CakeTestCase { '/optgroup', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3402,7 +3402,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->select( 'Model.multi_field', $options, array('multiple' => 'multiple') @@ -3426,7 +3426,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->select( 'Model.multi_field', $options, array('multiple' => true, 'value' => array(0, 1)) @@ -3450,7 +3450,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->select( 'Model.multi_field', $options, array('multiple' => false, 'value' => array(0, 1)) @@ -3470,7 +3470,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3518,7 +3518,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3566,7 +3566,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->select( 'Model.multi_field', @@ -3605,7 +3605,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->select( 'Model.multi_field', array('1' => 'first'), array('multiple' => 'checkbox') @@ -3624,7 +3624,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array('Model' => array('tags' => array(1))); $result = $this->Form->select( @@ -3654,7 +3654,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3688,7 +3688,7 @@ class FormHelperTest extends CakeTestCase { array('label' => array('for' => 'ModelTags1')), 'second', '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Model.tags', array( 'options' => array('first', 'second'), @@ -3697,7 +3697,7 @@ class FormHelperTest extends CakeTestCase { 'div' => false, 'label' => false )); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->validationErrors['Model']['tags'] = 'Select atleast one option'; $result = $this->Form->input('Model.tags', array( @@ -3715,7 +3715,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Model.tags', array( 'options' => array('one'), @@ -3733,7 +3733,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3796,7 +3796,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Model.multi_field', array( 'options' => array('a' => 'first', 'b' => 'second', 'c' => 'third'), @@ -3828,7 +3828,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Model.multi_field', array( 'options' => array('1' => 'first'), @@ -3845,7 +3845,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Model.multi_field', array( 'options' => array('2' => 'second'), @@ -3862,7 +3862,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** * testSelectHiddenFieldOmission method @@ -3891,7 +3891,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Model.multi_field', array( 'options' => array('first', 'second'), @@ -3917,7 +3917,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3945,7 +3945,7 @@ class FormHelperTest extends CakeTestCase { array('label' => array('for' => 'Category1')), '2', '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -3962,14 +3962,14 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->checkbox('Model.field', array('id' => 'theID', 'value' => 'myvalue')); $expected = array( 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'theID_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][field]', 'value' => 'myvalue', 'id' => 'theID')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->validationErrors['Model']['field'] = 1; $this->Form->request->data['Model']['field'] = 'myvalue'; @@ -3978,14 +3978,14 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'class' => 'form-error', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'theID_'), array('input' => array('preg:/[^<]+/', 'value' => 'myvalue', 'id' => 'theID', 'checked' => 'checked', 'class' => 'form-error')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->checkbox('Model.field', array('value' => 'myvalue')); $expected = array( 'input' => array('type' => 'hidden', 'class' => 'form-error', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField_'), array('input' => array('preg:/[^<]+/', 'value' => 'myvalue', 'id' => 'ModelField', 'checked' => 'checked', 'class' => 'form-error')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = ''; $result = $this->Form->checkbox('Model.field', array('id' => 'theID')); @@ -3993,7 +3993,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'class' => 'form-error', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'theID_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'theID', 'class' => 'form-error')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); unset($this->Form->validationErrors['Model']['field']); $result = $this->Form->checkbox('Model.field', array('value' => 'myvalue')); @@ -4001,7 +4001,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][field]', 'value' => 'myvalue', 'id' => 'ModelField')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['published'] = 1; $result = $this->Form->checkbox('Contact.published', array('id' => 'theID')); @@ -4009,7 +4009,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => 'data[Contact][published]', 'value' => '0', 'id' => 'theID_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Contact][published]', 'value' => '1', 'id' => 'theID', 'checked' => 'checked')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['published'] = 0; $result = $this->Form->checkbox('Contact.published', array('id'=>'theID')); @@ -4017,21 +4017,21 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => 'data[Contact][published]', 'value' => '0', 'id' => 'theID_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Contact][published]', 'value' => '1', 'id' => 'theID')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->checkbox('Model.CustomField.1.value'); $expected = array( 'input' => array('type' => 'hidden', 'name' => 'data[Model][CustomField][1][value]', 'value' => '0', 'id' => 'ModelCustomField1Value_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][CustomField][1][value]', 'value' => '1', 'id' => 'ModelCustomField1Value')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->checkbox('CustomField.1.value'); $expected = array( 'input' => array('type' => 'hidden', 'name' => 'data[CustomField][1][value]', 'value' => '0', 'id' => 'CustomField1Value_'), array('input' => array('type' => 'checkbox', 'name' => 'data[CustomField][1][value]', 'value' => '1', 'id' => 'CustomField1Value')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -4045,7 +4045,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => 'myField', 'value' => '0', 'id' => 'TestTest_'), array('input' => array('type' => 'checkbox', 'name' => 'myField', 'value' => '1', 'id' => 'TestTest')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -4059,28 +4059,28 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField', 'checked' => 'checked')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->checkbox('Model.field', array('checked' => 1)); $expected = array( 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField', 'checked' => 'checked')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->checkbox('Model.field', array('checked' => true)); $expected = array( 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField', 'checked' => 'checked')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->checkbox('Model.field', array('checked' => false)); $expected = array( 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = 1; $result = $this->Form->checkbox('Model.field', array('checked' => false)); @@ -4088,7 +4088,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => 'data[Model][field]', 'value' => '0', 'id' => 'ModelField_'), array('input' => array('type' => 'checkbox', 'name' => 'data[Model][field]', 'value' => '1', 'id' => 'ModelField')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -4102,14 +4102,14 @@ class FormHelperTest extends CakeTestCase { array('input' => array('type' => 'hidden', 'name' => 'data[Account][show_name]', 'value' => '0', 'id' => 'AccountShowName_', 'disabled' => 'disabled')), array('input' => array('type' => 'checkbox', 'name' => 'data[Account][show_name]', 'value' => '1', 'id' => 'AccountShowName', 'disabled' => 'disabled')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->checkbox('Account.show_name', array('disabled' => false)); $expected = array( array('input' => array('type' => 'hidden', 'name' => 'data[Account][show_name]', 'value' => '0', 'id' => 'AccountShowName_')), array('input' => array('type' => 'checkbox', 'name' => 'data[Account][show_name]', 'value' => '1', 'id' => 'AccountShowName')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -4134,7 +4134,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -4192,7 +4192,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->dateTime('Contact.date', 'DMY', '12'); $expected = array( @@ -4231,7 +4231,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->assertNoPattern('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $result = $this->Form->dateTime('Contact.date', 'DMY', '12', array('value' => false)); @@ -4271,7 +4271,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->assertNoPattern('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $result = $this->Form->dateTime('Contact.date', 'DMY', '12', array('value' => '')); @@ -4311,7 +4311,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->assertNoPattern('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $result = $this->Form->dateTime('Contact.date', 'DMY', '12', array('interval' => 5, 'value' => '')); @@ -4360,7 +4360,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->assertNoPattern('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $result = $this->Form->dateTime('Contact.date', 'DMY', '12', array('minuteInterval' => 5, 'value' => '')); @@ -4409,7 +4409,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->assertNoPattern('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $this->Form->request->data['Contact']['data'] = null; @@ -4450,7 +4450,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->assertNoPattern('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $this->Form->request->data['Model']['field'] = date('Y') . '-01-01 00:00:00'; @@ -4498,7 +4498,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $selected = strtotime('2008-10-26 10:33:00'); $result = $this->Form->dateTime('Model.field', 'DMY', '12', array('value' => $selected)); @@ -4538,7 +4538,7 @@ class FormHelperTest extends CakeTestCase { '*/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('published2', array('type' => 'date')); $now = strtotime('now'); @@ -4569,7 +4569,7 @@ class FormHelperTest extends CakeTestCase { '*/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('ContactTag'); $expected = array( @@ -4582,7 +4582,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->create('Contact'); $result = $this->Form->input('published', array('monthNames' => false)); @@ -4614,7 +4614,7 @@ class FormHelperTest extends CakeTestCase { '*/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('published', array('type' => 'time')); $now = strtotime('now'); @@ -4631,7 +4631,7 @@ class FormHelperTest extends CakeTestCase { '*/select', ':', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('published', array( 'timeFormat' => 24, @@ -4736,7 +4736,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->dateTime('Contact.2.updated'); $expected = array( @@ -4775,7 +4775,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -4798,7 +4798,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->month('Model.field', array('empty' => true)); $expected = array( @@ -4813,7 +4813,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->month('Model.field', array('monthNames' => false)); $expected = array( @@ -4828,7 +4828,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $monthNames = array( '01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', '06' => 'Jun', @@ -4846,7 +4846,7 @@ class FormHelperTest extends CakeTestCase { '/option', '*/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -4872,7 +4872,7 @@ class FormHelperTest extends CakeTestCase { $daysRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = '2006-10-10 23:12:32'; $result = $this->Form->day('Model.field'); @@ -4893,7 +4893,7 @@ class FormHelperTest extends CakeTestCase { $daysRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = ''; $result = $this->Form->day('Model.field', array('value' => '10')); @@ -4914,7 +4914,7 @@ class FormHelperTest extends CakeTestCase { $daysRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = '2006-10-10 23:12:32'; $result = $this->Form->day('Model.field', array('value' => true)); @@ -4935,7 +4935,7 @@ class FormHelperTest extends CakeTestCase { $daysRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -4964,7 +4964,7 @@ class FormHelperTest extends CakeTestCase { $minutesRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = '2006-10-10 00:12:32'; $result = $this->Form->minute('Model.field'); @@ -4988,7 +4988,7 @@ class FormHelperTest extends CakeTestCase { $minutesRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = ''; $result = $this->Form->minute('Model.field', array('interval' => 5)); @@ -5008,7 +5008,7 @@ class FormHelperTest extends CakeTestCase { $minutesRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = '2006-10-10 00:10:32'; $result = $this->Form->minute('Model.field', array('interval' => 5)); @@ -5028,7 +5028,7 @@ class FormHelperTest extends CakeTestCase { $minutesRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5054,7 +5054,7 @@ class FormHelperTest extends CakeTestCase { $hoursRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = '2006-10-10 00:12:32'; $result = $this->Form->hour('Model.field', false); @@ -5074,7 +5074,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = ''; $result = $this->Form->hour('Model.field', true, array('value' => '23')); @@ -5097,7 +5097,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['field'] = '2006-10-10 00:12:32'; $result = $this->Form->hour('Model.field', true); @@ -5117,7 +5117,7 @@ class FormHelperTest extends CakeTestCase { $hoursRegex, '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); unset($this->Form->request->data['Model']['field']); $result = $this->Form->hour('Model.field', true, array('value' => 'now')); @@ -5146,7 +5146,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->year('Model.field', 2006, 2007, array('orderYear' => 'asc')); $expected = array( @@ -5161,7 +5161,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->request->data['Contact']['published'] = ''; $result = $this->Form->year('Contact.published', 2006, 2007, array('class' => 'year')); @@ -5177,7 +5177,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['published'] = '2006-10-10'; $result = $this->Form->year('Contact.published', 2006, 2007, array('empty' => false)); @@ -5191,7 +5191,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['published'] = ''; $result = $this->Form->year('Contact.published', 2006, 2007, array('value' => false)); @@ -5207,7 +5207,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['published'] = '2006-10-10'; $result = $this->Form->year('Contact.published', 2006, 2007, array('empty' => false, 'value' => false)); @@ -5221,7 +5221,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['published'] = ''; $result = $this->Form->year('Contact.published', 2006, 2007, array('value' => 2007)); @@ -5237,7 +5237,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['published'] = '2006-10-10'; $result = $this->Form->year('Contact.published', 2006, 2007, array('empty' => false, 'value' => 2007)); @@ -5251,7 +5251,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['published'] = ''; $result = $this->Form->year('Contact.published', 2006, 2008, array('empty' => false, 'value' => 2007)); @@ -5268,7 +5268,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['published'] = '2006-10-10'; $result = $this->Form->year('Contact.published', 2006, 2008, array('empty' => false)); @@ -5285,7 +5285,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array(); $this->Form->create('Contact'); @@ -5303,7 +5303,7 @@ class FormHelperTest extends CakeTestCase { '/option', '/select', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5320,14 +5320,14 @@ class FormHelperTest extends CakeTestCase { 'some test data', '/textarea', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->textarea('Model.tmp'); $expected = array( 'textarea' => array('name' => 'data[Model][tmp]', 'id' => 'ModelTmp'), '/textarea', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array('Model' => array('field' => 'some test data with HTML chars')); $result = $this->Form->textarea('Model.field'); @@ -5336,7 +5336,7 @@ class FormHelperTest extends CakeTestCase { htmlentities('some test data with HTML chars'), '/textarea', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array('Model' => array('field' => 'some test data with HTML chars')); $result = $this->Form->textarea('Model.field', array('escape' => false)); @@ -5345,7 +5345,7 @@ class FormHelperTest extends CakeTestCase { 'some test data with HTML chars', '/textarea', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Model']['0']['OtherModel']['field'] = null; $result = $this->Form->textarea('Model.0.OtherModel.field'); @@ -5353,7 +5353,7 @@ class FormHelperTest extends CakeTestCase { 'textarea' => array('name' => 'data[Model][0][OtherModel][field]', 'id' => 'Model0OtherModelField'), '/textarea' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5378,7 +5378,7 @@ class FormHelperTest extends CakeTestCase { '/textarea', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5416,7 +5416,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'file', 'name' => 'data[Model][upload]', 'id' => 'ModelUpload'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5430,7 +5430,7 @@ class FormHelperTest extends CakeTestCase { $expected = array( 'input' => array('type' => 'file', 'name' => 'data[ValidateProfile][city]', 'id' => 'ValidateProfileCity') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5531,7 +5531,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'value' => ''), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Test Submit'); $expected = array( @@ -5539,7 +5539,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'value' => 'Test Submit'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Test Submit', array('div' => array('tag' => 'span'))); $expected = array( @@ -5547,11 +5547,11 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'value' => 'Test Submit'), '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Test Submit', array('class' => 'save', 'div' => false)); $expected = array('input' => array('type' => 'submit', 'value' => 'Test Submit', 'class' => 'save')); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Test Submit', array('div' => array('id' => 'SaveButton'))); $expected = array( @@ -5559,7 +5559,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'value' => 'Test Submit'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Next >'); $expected = array( @@ -5567,7 +5567,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'value' => 'Next >'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Next >', array('escape' => false)); $expected = array( @@ -5575,7 +5575,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'value' => 'Next >'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Reset!', array('type' => 'reset')); $expected = array( @@ -5583,7 +5583,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'reset', 'value' => 'Reset!'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $before = '--before--'; $after = '--after--'; @@ -5594,7 +5594,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'value' => 'Test'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Test', array('after' => $after)); $expected = array( @@ -5603,7 +5603,7 @@ class FormHelperTest extends CakeTestCase { '--after--', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Test', array('before' => $before, 'after' => $after)); $expected = array( @@ -5613,7 +5613,7 @@ class FormHelperTest extends CakeTestCase { '--after--', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5628,7 +5628,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'image', 'src' => 'http://example.com/cake.power.gif'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('/relative/cake.power.gif'); $expected = array( @@ -5636,7 +5636,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'image', 'src' => 'relative/cake.power.gif'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('cake.power.gif'); $expected = array( @@ -5644,7 +5644,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'image', 'src' => 'img/cake.power.gif'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Not.an.image'); $expected = array( @@ -5652,7 +5652,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'value' => 'Not.an.image'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $after = '--after--'; $before = '--before--'; @@ -5663,7 +5663,7 @@ class FormHelperTest extends CakeTestCase { '--after--', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('cake.power.gif', array('before' => $before)); $expected = array( @@ -5672,7 +5672,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'image', 'src' => 'img/cake.power.gif'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('cake.power.gif', array('before' => $before, 'after' => $after)); $expected = array( @@ -5682,7 +5682,7 @@ class FormHelperTest extends CakeTestCase { '--after--', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->submit('Not.an.image', array('before' => $before, 'after' => $after)); $expected = array( @@ -5692,7 +5692,7 @@ class FormHelperTest extends CakeTestCase { '--after--', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5713,21 +5713,21 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->create('Contact', array('type' => 'GET')); $expected = array('form' => array( 'id' => 'ContactAddForm', 'method' => 'get', 'action' => '/contacts/add', 'accept-charset' => $encoding )); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->create('Contact', array('type' => 'get')); $expected = array('form' => array( 'id' => 'ContactAddForm', 'method' => 'get', 'action' => '/contacts/add', 'accept-charset' => $encoding )); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->create('Contact', array('type' => 'put')); $expected = array( @@ -5739,7 +5739,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'PUT'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->create('Contact', array('type' => 'file')); $expected = array( @@ -5751,7 +5751,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['id'] = 1; $this->Form->request->here = '/contacts/edit/1'; @@ -5766,7 +5766,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'PUT'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['Contact']['id'] = 1; $this->Form->request->here = '/contacts/edit/1'; @@ -5781,7 +5781,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'PUT'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data['ContactNonStandardPk']['pk'] = 1; $result = $this->Form->create('ContactNonStandardPk', array('url' => array('action' => 'edit'))); @@ -5794,7 +5794,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'PUT'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->create('Contact', array('id' => 'TestId')); $expected = array( @@ -5806,7 +5806,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'PUT'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request['action'] = 'add'; $result = $this->Form->create('User', array('url' => array('action' => 'login'))); @@ -5819,7 +5819,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->create('User', array('action' => 'login')); $expected = array( @@ -5831,7 +5831,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->create('User', array('url' => '/users/login')); $expected = array( @@ -5840,7 +5840,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request['controller'] = 'pages'; $this->Form->request['models'] = array('User', 'Post'); @@ -5854,7 +5854,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array(); $this->Form->request['controller'] = 'contacts'; @@ -5869,7 +5869,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5891,7 +5891,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request['action'] = 'delete'; $this->Form->request->here = '/base_url/contacts/delete/10/User:42'; @@ -5906,7 +5906,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5928,7 +5928,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5944,7 +5944,7 @@ class FormHelperTest extends CakeTestCase { $expected = array( 'input' => array('type' => 'text', 'name' => 'data[User][username]', 'id' => 'UserUsername') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('username', array('div' => true, 'label' => 'username')); $expected = array( @@ -5953,7 +5953,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'text', 'name' => 'data[User][username]', 'id' => 'UserUsername'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -5975,7 +5975,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6004,7 +6004,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected, true); + $this->assertTags($expected, $result, true); } /** @@ -6029,7 +6029,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6059,7 +6059,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected, true); + $this->assertTags($expected, $result, true); } /** @@ -6107,13 +6107,13 @@ class FormHelperTest extends CakeTestCase { 'id' => 'addForm', 'method' => 'get', 'action' => '/contact_test/add', 'accept-charset' => $encoding )); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->text('reason'); $expected = array( 'input' => array('type' => 'text', 'name' => 'reason', 'id' => 'reason') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6167,7 +6167,7 @@ class FormHelperTest extends CakeTestCase { array('option' => array('value' => 3)), 'Larry', '/option', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6188,7 +6188,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('name'); $expected = array( @@ -6202,7 +6202,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('non_existing_field_in_contact_model'); $expected = array( @@ -6216,7 +6216,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Address.street'); $expected = array( @@ -6230,7 +6230,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Address.non_existing_field_in_model'); $expected = array( @@ -6244,7 +6244,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('name', array('div' => false)); $expected = array( @@ -6256,7 +6256,7 @@ class FormHelperTest extends CakeTestCase { 'id' => 'ContactName', 'maxlength' => '255' ) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.non_existing'); $expected = array( @@ -6270,7 +6270,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.imrequired'); $expected = array( @@ -6284,7 +6284,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.imalsorequired'); $expected = array( @@ -6298,7 +6298,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.imrequiredtoo'); $expected = array( @@ -6312,7 +6312,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.required_one'); $expected = array( @@ -6326,7 +6326,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.imnotrequired'); $expected = array( @@ -6340,7 +6340,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.imalsonotrequired'); $expected = array( @@ -6354,7 +6354,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.imnotrequiredeither'); $expected = array( @@ -6368,7 +6368,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); extract($this->dateRegex); $now = strtotime('now'); @@ -6404,7 +6404,7 @@ class FormHelperTest extends CakeTestCase { date('Y', $now), '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.updated', array('div' => false)); $expected = array( @@ -6437,7 +6437,7 @@ class FormHelperTest extends CakeTestCase { date('Y', $now), '*/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('UserForm.stuff'); $expected = array( @@ -6451,7 +6451,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected, true); + $this->assertTags($expected, $result, true); } /** @@ -6472,7 +6472,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.non_existing_nor_validated', array('div' => false)); $expected = array( @@ -6484,7 +6484,7 @@ class FormHelperTest extends CakeTestCase { 'id' => 'ContactNonExistingNorValidated' ) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.non_existing_nor_validated', array( 'div' => false, 'value' => 'my value' @@ -6498,7 +6498,7 @@ class FormHelperTest extends CakeTestCase { 'value' => 'my value', 'id' => 'ContactNonExistingNorValidated' ) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->request->data = array( 'Contact' => array('non_existing_nor_validated' => 'CakePHP magic' @@ -6513,7 +6513,7 @@ class FormHelperTest extends CakeTestCase { 'value' => 'CakePHP magic', 'id' => 'ContactNonExistingNorValidated' ) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6534,7 +6534,7 @@ class FormHelperTest extends CakeTestCase { 'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.name', array('div' => false, 'label' => false)); $this->assertTags($result, array('input' => array( @@ -6552,7 +6552,7 @@ class FormHelperTest extends CakeTestCase { 'id' => 'ContactName', 'maxlength' => '255' ) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.name', array( 'div' => false, 'label' => array('class' => 'mandatory') @@ -6566,7 +6566,7 @@ class FormHelperTest extends CakeTestCase { 'id' => 'ContactName', 'maxlength' => '255' ) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.name', array( 'div' => false, 'label' => array('class' => 'mandatory', 'text' => 'My label') @@ -6580,7 +6580,7 @@ class FormHelperTest extends CakeTestCase { 'id' => 'ContactName', 'maxlength' => '255' ) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.name', array( 'div' => false, 'id' => 'my_id', 'label' => array('for' => 'my_id') @@ -6594,7 +6594,7 @@ class FormHelperTest extends CakeTestCase { 'id' => 'my_id', 'maxlength' => '255' ) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('1.id'); $this->assertTags($result, array('input' => array( @@ -6614,7 +6614,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.1.id'); $this->assertTags($result, array( @@ -6636,7 +6636,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6655,7 +6655,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/form' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->end(array('label' => '')); $expected = array( @@ -6664,7 +6664,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/form' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->end('save'); $expected = array( @@ -6673,7 +6673,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/form' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->end(array('label' => 'save')); $expected = array( @@ -6682,7 +6682,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/form' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->end(array('label' => 'save', 'name' => 'Whatever')); $expected = array( @@ -6691,7 +6691,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/form' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->end(array('name' => 'Whatever')); $expected = array( @@ -6700,7 +6700,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/form' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->end(array('label' => 'save', 'name' => 'Whatever', 'div' => 'good')); $expected = array( @@ -6709,7 +6709,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/form' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->end(array( 'label' => 'save', 'name' => 'Whatever', 'div' => array('class' => 'good') @@ -6720,7 +6720,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/form' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6771,7 +6771,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); ClassRegistry::init('TestMail'); $this->Form->create('TestMail'); @@ -6787,7 +6787,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6835,7 +6835,7 @@ class FormHelperTest extends CakeTestCase { '/optgroup', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); /* * #2 This is structurally identical to the test above (#1) - only the parent name has @@ -6874,7 +6874,7 @@ class FormHelperTest extends CakeTestCase { '/optgroup', '/select' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6901,7 +6901,7 @@ class FormHelperTest extends CakeTestCase { '/textarea', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('ValidateProfile.1.ValidateItem.2.created',array('empty' => true)); $expected = array( @@ -6935,7 +6935,7 @@ class FormHelperTest extends CakeTestCase { '/select', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Form->validationErrors['ValidateProfile'][1]['ValidateItem'][2]['profile_id'] = 'Error'; $this->Form->request->data['ValidateProfile'][1]['ValidateItem'][2]['profile_id'] = '1'; @@ -6956,7 +6956,7 @@ class FormHelperTest extends CakeTestCase { '/div', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -6995,7 +6995,7 @@ class FormHelperTest extends CakeTestCase { ), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.email', array( 'type' => 'text', 'format' => array('input', 'label'), @@ -7014,7 +7014,7 @@ class FormHelperTest extends CakeTestCase { '/label', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->input('Contact.email', array( 'type' => 'text', 'format' => array('input', 'between', 'label', 'after'), @@ -7038,7 +7038,7 @@ class FormHelperTest extends CakeTestCase { '/span', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -7051,25 +7051,25 @@ class FormHelperTest extends CakeTestCase { $expected = array( 'input' => array('type' => 'email', 'name' => 'data[User][email]', 'id' => 'UserEmail') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->search('User.query'); $expected = array( 'input' => array('type' => 'search', 'name' => 'data[User][query]', 'id' => 'UserQuery') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->search('User.query', array('value' => 'test')); $expected = array( 'input' => array('type' => 'search', 'name' => 'data[User][query]', 'id' => 'UserQuery', 'value' => 'test') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Form->search('User.query', array('type' => 'text', 'value' => 'test')); $expected = array( 'input' => array('type' => 'text', 'name' => 'data[User][query]', 'id' => 'UserQuery', 'value' => 'test') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index 13b605367..62c508dba 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -174,11 +174,11 @@ class HtmlHelperTest extends CakeTestCase { function testDocType() { $result = $this->Html->docType(); $expected = ''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Html->docType('html4-strict'); $expected = ''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertNull($this->Html->docType('non-existing-doctype')); } @@ -194,11 +194,11 @@ class HtmlHelperTest extends CakeTestCase { $result = $this->Html->link('/home'); $expected = array('a' => array('href' => '/home'), 'preg:/\/home/', '/a'); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->link('Posts', array('controller' => 'posts', 'action' => 'index', 'full_base' => true)); $expected = array('a' => array('href' => FULL_BASE_URL . '/posts'), 'Posts', '/a'); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->link('Home', '/home', array('confirm' => 'Are you sure you want to do this?')); $expected = array( @@ -206,7 +206,7 @@ class HtmlHelperTest extends CakeTestCase { 'Home', '/a' ); - $this->assertTags($result, $expected, true); + $this->assertTags($expected, $result, true); $result = $this->Html->link('Home', '/home', array('default' => false)); $expected = array( @@ -214,7 +214,7 @@ class HtmlHelperTest extends CakeTestCase { 'Home', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->link('Next >', '#'); $expected = array( @@ -222,7 +222,7 @@ class HtmlHelperTest extends CakeTestCase { 'Next >', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->link('Next >', '#', array('escape' => true)); $expected = array( @@ -230,7 +230,7 @@ class HtmlHelperTest extends CakeTestCase { 'Next >', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->link('Next >', '#', array('escape' => 'utf-8')); $expected = array( @@ -238,7 +238,7 @@ class HtmlHelperTest extends CakeTestCase { 'Next >', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->link('Next >', '#', array('escape' => false)); $expected = array( @@ -246,7 +246,7 @@ class HtmlHelperTest extends CakeTestCase { 'Next >', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->link('Next >', '#', array( 'title' => 'to escape … or not escape?', @@ -257,7 +257,7 @@ class HtmlHelperTest extends CakeTestCase { 'Next >', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->link('Next >', '#', array( 'title' => 'to escape … or not escape?', @@ -268,7 +268,7 @@ class HtmlHelperTest extends CakeTestCase { 'Next >', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->link('Original size', array( 'controller' => 'images', 'action' => 'view', 3, '?' => array('height' => 100, 'width' => 200) @@ -278,7 +278,7 @@ class HtmlHelperTest extends CakeTestCase { 'Original size', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); Configure::write('Asset.timestamp', false); @@ -288,7 +288,7 @@ class HtmlHelperTest extends CakeTestCase { 'img' => array('src' => 'img/test.gif', 'alt' => ''), '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->image('test.gif', array('url' => '#')); $expected = array( @@ -296,7 +296,7 @@ class HtmlHelperTest extends CakeTestCase { 'img' => array('src' => 'img/test.gif', 'alt' => ''), '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); Configure::write('Asset.timestamp', 'force'); @@ -306,7 +306,7 @@ class HtmlHelperTest extends CakeTestCase { 'img' => array('src' => 'preg:/img\/..\/favicon\.ico\?\d*/', 'alt' => ''), '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->image('../favicon.ico', array('url' => '#')); $expected = array( @@ -314,7 +314,7 @@ class HtmlHelperTest extends CakeTestCase { 'img' => array('src' => 'preg:/img\/..\/favicon\.ico\?\d*/', 'alt' => ''), '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -362,7 +362,7 @@ class HtmlHelperTest extends CakeTestCase { $expected = array( 'img' => array('src' => 'preg:/\/testing\/longer\/img\/cake\.icon\.png\?[0-9]+/', 'alt' => '') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -426,14 +426,14 @@ class HtmlHelperTest extends CakeTestCase { $expected = array( 'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'preg:/.*theme\/test_theme\/css\/webroot_test\.css/') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Html->theme = 'test_theme'; $result = $this->Html->css('theme_webroot'); $expected = array( 'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'preg:/.*theme\/test_theme\/css\/theme_webroot\.css/') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); Configure::write('App.www_root', $webRoot); } @@ -468,27 +468,27 @@ class HtmlHelperTest extends CakeTestCase { $expected = array( 'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'preg:/.*css\/screen\.css/') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->css('screen.css'); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->css('my.css.library'); $expected['link']['href'] = 'preg:/.*css\/my\.css\.library\.css/'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->css('screen.css?1234'); $expected['link']['href'] = 'preg:/.*css\/screen\.css\?1234/'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->css('http://whatever.com/screen.css?1234'); $expected['link']['href'] = 'preg:/http:\/\/.*\/screen\.css\?1234/'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); Configure::write('Asset.filter.css', 'css.php'); $result = $this->Html->css('cake.generic'); $expected['link']['href'] = 'preg:/.*ccss\/cake\.generic\.css/'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); Configure::write('Asset.filter.css', false); @@ -528,29 +528,29 @@ class HtmlHelperTest extends CakeTestCase { $result = $this->Html->css('cake.generic'); $expected['link']['href'] = 'preg:/.*css\/cake\.generic\.css\?[0-9]+/'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); Configure::write('debug', 0); $result = $this->Html->css('cake.generic'); $expected['link']['href'] = 'preg:/.*css\/cake\.generic\.css/'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); Configure::write('Asset.timestamp', 'force'); $result = $this->Html->css('cake.generic'); $expected['link']['href'] = 'preg:/.*css\/cake\.generic\.css\?[0-9]+/'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Html->request->webroot = '/testing/'; $result = $this->Html->css('cake.generic'); $expected['link']['href'] = 'preg:/\/testing\/css\/cake\.generic\.css\?[0-9]+/'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Html->request->webroot = '/testing/longer/'; $result = $this->Html->css('cake.generic'); $expected['link']['href'] = 'preg:/\/testing\/longer\/css\/cake\.generic\.css\?[0-9]+/'; - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -591,7 +591,7 @@ class HtmlHelperTest extends CakeTestCase { $expected = array( 'script' => array('type' => 'text/javascript', 'src' => 'js/foo.js') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->script(array('foobar', 'bar')); $expected = array( @@ -600,31 +600,31 @@ class HtmlHelperTest extends CakeTestCase { array('script' => array('type' => 'text/javascript', 'src' => 'js/bar.js')), '/script', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->script('jquery-1.3'); $expected = array( 'script' => array('type' => 'text/javascript', 'src' => 'js/jquery-1.3.js') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->script('test.json'); $expected = array( 'script' => array('type' => 'text/javascript', 'src' => 'js/test.json.js') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->script('/plugin/js/jquery-1.3.2.js?someparam=foo'); $expected = array( 'script' => array('type' => 'text/javascript', 'src' => '/plugin/js/jquery-1.3.2.js?someparam=foo') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->script('test.json.js?foo=bar'); $expected = array( 'script' => array('type' => 'text/javascript', 'src' => 'js/test.json.js?foo=bar') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->script('foo'); $this->assertNull($result, 'Script returned upon duplicate inclusion %s'); @@ -639,7 +639,7 @@ class HtmlHelperTest extends CakeTestCase { $expected = array( 'script' => array('type' => 'text/javascript', 'src' => 'js/jquery-1.3.2.js', 'defer' => 'defer', 'encoding' => 'utf-8') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->View->expects($this->any())->method('addScript') ->with($this->matchesRegularExpression('/script_in_head.js/')); @@ -671,7 +671,7 @@ class HtmlHelperTest extends CakeTestCase { $expected = array( 'script' => array('src' => '/theme/test_theme/js/__test_js.js', 'type' => 'text/javascript') ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $folder = new Folder(WWW_ROOT . 'theme' . DS . 'test_theme'); $folder->delete(); @@ -692,7 +692,7 @@ class HtmlHelperTest extends CakeTestCase { $this->cDataEnd, '/script', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->scriptBlock('window.foo = 2;', array('safe' => false)); $expected = array( @@ -700,7 +700,7 @@ class HtmlHelperTest extends CakeTestCase { 'window.foo = 2;', '/script', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->scriptBlock('window.foo = 2;', array('safe' => true)); $expected = array( @@ -710,7 +710,7 @@ class HtmlHelperTest extends CakeTestCase { $this->cDataEnd, '/script', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->View->expects($this->any())->method('addScript') @@ -725,7 +725,7 @@ class HtmlHelperTest extends CakeTestCase { 'window.foo = 2;', '/script', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -746,7 +746,7 @@ class HtmlHelperTest extends CakeTestCase { $this->cDataEnd, '/script' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->scriptStart(array('safe' => false)); @@ -759,7 +759,7 @@ class HtmlHelperTest extends CakeTestCase { 'this is some javascript', '/script' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->View->expects($this->once())->method('addScript'); $result = $this->Html->scriptStart(array('safe' => false, 'inline' => false)); @@ -814,7 +814,7 @@ class HtmlHelperTest extends CakeTestCase { 'Third', '/a', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->getCrumbs(' > '); $expected = array( @@ -830,7 +830,7 @@ class HtmlHelperTest extends CakeTestCase { 'Third', '/a', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->assertPattern('/^]+>First<\/a> > ]+>Second<\/a> > ]+>Third<\/a>$/', $result); $this->assertPattern('/]*>First<\/a>/', $result); @@ -856,7 +856,7 @@ class HtmlHelperTest extends CakeTestCase { '»', 'Fourth' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -914,7 +914,7 @@ class HtmlHelperTest extends CakeTestCase { '/li', '/ul' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->nestedList($list, null); $expected = array( @@ -944,7 +944,7 @@ class HtmlHelperTest extends CakeTestCase { '/li', '/ul' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->nestedList($list, array(), array(), 'ol'); $expected = array( @@ -974,7 +974,7 @@ class HtmlHelperTest extends CakeTestCase { '/li', '/ol' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->nestedList($list, 'ol'); $expected = array( @@ -1004,7 +1004,7 @@ class HtmlHelperTest extends CakeTestCase { '/li', '/ol' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->nestedList($list, array('class'=>'list')); $expected = array( @@ -1034,7 +1034,7 @@ class HtmlHelperTest extends CakeTestCase { '/li', '/ul' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->nestedList($list, array(), array('class' => 'item')); $expected = array( @@ -1064,7 +1064,7 @@ class HtmlHelperTest extends CakeTestCase { '/li', '/ul' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->nestedList($list, array(), array('even' => 'even', 'odd' => 'odd')); $expected = array( @@ -1094,7 +1094,7 @@ class HtmlHelperTest extends CakeTestCase { '/li', '/ul' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->nestedList($list, array('class'=>'list'), array('class' => 'item')); $expected = array( @@ -1124,7 +1124,7 @@ class HtmlHelperTest extends CakeTestCase { '/li', '/ul' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1160,14 +1160,14 @@ class HtmlHelperTest extends CakeTestCase { 'link' => array('href' => 'preg:/.*favicon\.ico/', 'rel' => 'icon'), array('link' => array('href' => 'preg:/.*favicon\.ico/', 'rel' => 'shortcut icon')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->meta('icon', 'favicon.ico'); $expected = array( 'link' => array('href' => 'preg:/.*favicon\.ico/', 'type' => 'image/x-icon', 'rel' => 'icon'), array('link' => array('href' => 'preg:/.*favicon\.ico/', 'type' => 'image/x-icon', 'rel' => 'shortcut icon')) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Html->meta('keywords', 'these, are, some, meta, keywords'); $this->assertTags($result, array('meta' => array('name' => 'keywords', 'content' => 'these, are, some, meta, keywords'))); @@ -1197,7 +1197,7 @@ class HtmlHelperTest extends CakeTestCase { function testTableHeaders() { $result = $this->Html->tableHeaders(array('ID', 'Name', 'Date')); $expected = array('assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1220,7 +1220,7 @@ class HtmlHelperTest extends CakeTestCase { array('td' => array('width' => 'preg:/100px/')), 'td content 3', '/td', '/tr' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $tr = array('td content 1', 'td content 2', 'td content 3'); $result = $this->Html->tableCells($tr, null, null, true); @@ -1231,7 +1231,7 @@ class HtmlHelperTest extends CakeTestCase { array('td' => array('class' => 'column-3')), 'td content 3', '/td', '/tr' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $tr = array('td content 1', 'td content 2', 'td content 3'); $result = $this->Html->tableCells($tr, true); @@ -1242,7 +1242,7 @@ class HtmlHelperTest extends CakeTestCase { array('td' => array('class' => 'column-3')), 'td content 3', '/td', '/tr' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $tr = array( array('td content 1', 'td content 2', 'td content 3'), @@ -1251,7 +1251,7 @@ class HtmlHelperTest extends CakeTestCase { ); $result = $this->Html->tableCells($tr, array('class' => 'odd'), array('class' => 'even')); $expected = "td content 1 td content 2 td content 3\ntd content 1 td content 2 td content 3\ntd content 1 td content 2 td content 3"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $tr = array( array('td content 1', 'td content 2', 'td content 3'), @@ -1261,7 +1261,7 @@ class HtmlHelperTest extends CakeTestCase { ); $result = $this->Html->tableCells($tr, array('class' => 'odd'), array('class' => 'even')); $expected = "td content 1 td content 2 td content 3\ntd content 1 td content 2 td content 3\ntd content 1 td content 2 td content 3\ntd content 1 td content 2 td content 3"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $tr = array( array('td content 1', 'td content 2', 'td content 3'), @@ -1271,7 +1271,7 @@ class HtmlHelperTest extends CakeTestCase { $this->Html->tableCells($tr, array('class' => 'odd'), array('class' => 'even')); $result = $this->Html->tableCells($tr, array('class' => 'odd'), array('class' => 'even'), false, false); $expected = "td content 1 td content 2 td content 3\ntd content 1 td content 2 td content 3\ntd content 1 td content 2 td content 3"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1392,7 +1392,7 @@ class HtmlHelperTest extends CakeTestCase { 'formend' => 'finish form' ) ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $tags = $this->Html->getAttribute('_tags'); $this->assertEqual($tags['form'], 'start form'); $this->assertEqual($tags['formend'], 'finish form'); @@ -1402,7 +1402,7 @@ class HtmlHelperTest extends CakeTestCase { $expected = array( 'minimizedAttributeFormat' => 'format' ); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertEqual($this->Html->getAttribute('_minimizedAttributeFormat'), 'format'); } diff --git a/lib/Cake/Test/Case/View/Helper/JqueryEngineHelperTest.php b/lib/Cake/Test/Case/View/Helper/JqueryEngineHelperTest.php index 970836230..cff458cc9 100644 --- a/lib/Cake/Test/Case/View/Helper/JqueryEngineHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/JqueryEngineHelperTest.php @@ -79,15 +79,15 @@ class JqueryEngineHelperTest extends CakeTestCase { $this->Jquery->get('#myLink'); $result = $this->Jquery->event('click', 'doClick', array('wrap' => false)); $expected = '$("#myLink").bind("click", doClick);'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->event('click', '$(this).show();', array('stop' => false)); $expected = '$("#myLink").bind("click", function (event) {$(this).show();});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->event('click', '$(this).hide();'); $expected = '$("#myLink").bind("click", function (event) {$(this).hide();'."\n".'return false;});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -98,7 +98,7 @@ class JqueryEngineHelperTest extends CakeTestCase { function testDomReady() { $result = $this->Jquery->domReady('foo.name = "bar";'); $expected = '$(document).ready(function () {foo.name = "bar";});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -110,7 +110,7 @@ class JqueryEngineHelperTest extends CakeTestCase { $this->Jquery->get('#foo'); $result = $this->Jquery->each('$(this).hide();'); $expected = '$("#foo").each(function () {$(this).hide();});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -122,39 +122,39 @@ class JqueryEngineHelperTest extends CakeTestCase { $this->Jquery->get('#foo'); $result = $this->Jquery->effect('show'); $expected = '$("#foo").show();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->effect('hide'); $expected = '$("#foo").hide();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->effect('hide', array('speed' => 'fast')); $expected = '$("#foo").hide("fast");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->effect('fadeIn'); $expected = '$("#foo").fadeIn();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->effect('fadeOut'); $expected = '$("#foo").fadeOut();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->effect('slideIn'); $expected = '$("#foo").slideDown();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->effect('slideOut'); $expected = '$("#foo").slideUp();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->effect('slideDown'); $expected = '$("#foo").slideDown();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->effect('slideUp'); $expected = '$("#foo").slideUp();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -165,13 +165,13 @@ class JqueryEngineHelperTest extends CakeTestCase { function testRequest() { $result = $this->Jquery->request(array('controller' => 'posts', 'action' => 'view', 1)); $expected = '$.ajax({url:"\\/posts\\/view\\/1"});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->request(array('controller' => 'posts', 'action' => 'view', 1), array( 'update' => '#content' )); $expected = '$.ajax({dataType:"html", success:function (data, textStatus) {$("#content").html(data);}, url:"\/posts\/view\/1"});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->request('/people/edit/1', array( 'method' => 'post', @@ -184,7 +184,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$.ajax({beforeSend:doBefore, complete:doComplete, data:"name=jim&height=185cm", dataType:"json", error:handleError, success:doSuccess, type:"post", url:"\\/people\\/edit\\/1"});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->request('/people/edit/1', array( 'update' => '#updated', @@ -193,7 +193,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$.ajax({dataType:"html", success:function (data, textStatus) {doFoo$("#updated").html(data);}, type:"post", url:"\\/people\\/edit\\/1"});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->request('/people/edit/1', array( 'update' => '#updated', @@ -204,7 +204,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$.ajax({data:$("#someId").serialize(), dataType:"html", success:function (data, textStatus) {doFoo$("#updated").html(data);}, type:"post", url:"\\/people\\/edit\\/1"});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->request('/people/edit/1', array( 'success' => 'doFoo', @@ -214,7 +214,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'data' => '$("#someId").serialize()', )); $expected = '$.ajax({beforeSend:function (XMLHttpRequest) {doBefore}, data:$("#someId").serialize(), success:function (data, textStatus) {doFoo}, type:"post", url:"\\/people\\/edit\\/1"});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -234,7 +234,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$j.ajax({data:$j("#someId").serialize(), dataType:"html", success:function (data, textStatus) {doFoo$j("#updated").html(data);}, type:"post", url:"\\/people\\/edit\\/1"});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -253,7 +253,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$("#myList").sortable({containment:"parent", distance:5, sort:onSort, start:onStart, stop:onStop});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->sortable(array( 'distance' => 5, @@ -263,7 +263,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'sort' => 'onSort', )); $expected = '$("#myList").sortable({containment:"parent", distance:5, sort:function (event, ui) {onSort}, start:function (event, ui) {onStart}, stop:function (event, ui) {onStop}});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -282,7 +282,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$("#element").draggable({containment:"#content", drag:onDrag, grid:[10,10], start:onStart, stop:onStop});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->drag(array( 'container' => '#content', @@ -292,7 +292,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'snapGrid' => array(10, 10), )); $expected = '$("#element").draggable({containment:"#content", drag:function (event, ui) {onDrag}, grid:[10,10], start:function (event, ui) {onStart}, stop:function (event, ui) {onStop}});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -310,7 +310,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$("#element").droppable({accept:".items", drop:onDrop, out:onExit, over:onHover});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->drop(array( 'accept' => '.items', @@ -319,7 +319,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'drop' => 'onDrop', )); $expected = '$("#element").droppable({accept:".items", drop:function (event, ui) {onDrop}, out:function (event, ui) {onExit}, over:function (event, ui) {onHover}});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -339,7 +339,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$("#element").slider({change:onChange, max:10, min:0, orientation:"vertical", stop:onComplete, value:2});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->slider(array( 'complete' => 'onComplete', @@ -350,7 +350,7 @@ class JqueryEngineHelperTest extends CakeTestCase { 'direction' => 'vertical', )); $expected = '$("#element").slider({change:function (event, ui) {onChange}, max:10, min:0, orientation:"vertical", stop:function (event, ui) {onComplete}, value:2});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -362,14 +362,14 @@ class JqueryEngineHelperTest extends CakeTestCase { $this->Jquery->get('#element'); $result = $this->Jquery->serializeForm(array('isForm' => false)); $expected = '$("#element").closest("form").serialize();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->serializeForm(array('isForm' => true)); $expected = '$("#element").serialize();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Jquery->serializeForm(array('isForm' => false, 'inline' => true)); $expected = '$("#element").closest("form").serialize()'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php index 7aa1bbaff..801d02375 100644 --- a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php @@ -269,7 +269,7 @@ class JsHelperTest extends CakeTestCase { $this->cDataEnd, '/script', ); - $this->assertTags($result, $expected, true); + $this->assertTags($expected, $result, true); $this->Js->TestJsEngine->expects($this->atLeastOnce())->method('domReady'); $result = $this->Js->writeBuffer(array('onDomReady' => true, 'cache' => false, 'clear' => false)); @@ -326,7 +326,7 @@ class JsHelperTest extends CakeTestCase { $expected = array( 'script' => array('type' => 'text/javascript', 'src' => 'preg:/(.)*\.js/'), ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); preg_match('/src="(.*\.js)"/', $result, $filename); $this->assertTrue(file_exists(WWW_ROOT . $filename[1])); $contents = file_get_contents(WWW_ROOT . $filename[1]); @@ -363,7 +363,7 @@ class JsHelperTest extends CakeTestCase { 'test link', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -400,7 +400,7 @@ class JsHelperTest extends CakeTestCase { 'test link »', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -419,7 +419,7 @@ class JsHelperTest extends CakeTestCase { 'test link', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -451,7 +451,7 @@ class JsHelperTest extends CakeTestCase { $this->cDataEnd, '/script' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -482,7 +482,7 @@ class JsHelperTest extends CakeTestCase { '-event handler-', '/script' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -521,7 +521,7 @@ class JsHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'id' => $options['id'], 'value' => 'Save', 'style' => 'margin: 0'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -567,7 +567,7 @@ class JsHelperTest extends CakeTestCase { 'input' => array('type' => 'submit', 'id' => $options['id'], 'value' => 'Save'), '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -589,11 +589,11 @@ class JsHelperTest extends CakeTestCase { $this->Js->TestJsEngine->expects($this->at(2)) ->method('request') ->will($this->returnValue('ajax-code')); - + $this->Js->TestJsEngine->expects($this->at(3)) ->method('event') ->will($this->returnValue('event-handler')); - + $params = array( 'update' => $options['update'], 'data' => 'serialize-code', 'method' => 'post', 'dataExpression' => true, 'buffer' => false @@ -612,7 +612,7 @@ class JsHelperTest extends CakeTestCase { 'event-handler', '/script' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -623,7 +623,7 @@ class JsHelperTest extends CakeTestCase { function testObjectPassThrough() { $result = $this->Js->object(array('one' => 'first', 'two' => 'second')); $expected = '{"one":"first","two":"second"}'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -635,7 +635,7 @@ class JsHelperTest extends CakeTestCase { function testValuePassThrough() { $result = $this->Js->value('string "quote"', true); $expected = '"string \"quote\""'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -718,27 +718,27 @@ class JsBaseEngineTest extends CakeTestCase { function testEscaping() { $result = $this->JsEngine->escape(''); $expected = ''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->escape('CakePHP' . "\n" . 'Rapid Development Framework'); $expected = 'CakePHP\\nRapid Development Framework'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->escape('CakePHP' . "\r\n" . 'Rapid Development Framework' . "\r" . 'For PHP'); $expected = 'CakePHP\\r\\nRapid Development Framework\\rFor PHP'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->escape('CakePHP: "Rapid Development Framework"'); $expected = 'CakePHP: \\"Rapid Development Framework\\"'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->escape("CakePHP: 'Rapid Development Framework'"); $expected = "CakePHP: 'Rapid Development Framework'"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->escape('my \\"string\\"'); $expected = 'my \\\\\\"string\\\\\\"'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -749,11 +749,11 @@ class JsBaseEngineTest extends CakeTestCase { function testPrompt() { $result = $this->JsEngine->prompt('Hey, hey you', 'hi!'); $expected = 'prompt("Hey, hey you", "hi!");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->prompt('"Hey"', '"hi"'); $expected = 'prompt("\"Hey\"", "\"hi\"");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -764,11 +764,11 @@ class JsBaseEngineTest extends CakeTestCase { function testAlert() { $result = $this->JsEngine->alert('Hey there'); $expected = 'alert("Hey there");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->alert('"Hey"'); $expected = 'alert("\"Hey\"");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -779,11 +779,11 @@ class JsBaseEngineTest extends CakeTestCase { function testConfirm() { $result = $this->JsEngine->confirm('Are you sure?'); $expected = 'confirm("Are you sure?");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->confirm('"Are you sure?"'); $expected = 'confirm("\"Are you sure?\"");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -794,7 +794,7 @@ class JsBaseEngineTest extends CakeTestCase { function testRedirect() { $result = $this->JsEngine->redirect(array('controller' => 'posts', 'action' => 'view', 1)); $expected = 'window.location = "/posts/view/1";'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -807,17 +807,17 @@ class JsBaseEngineTest extends CakeTestCase { $object = array('title' => 'New thing', 'indexes' => array(5, 6, 7, 8)); $result = $this->JsEngine->object($object); $expected = '{"title":"New thing","indexes":[5,6,7,8]}'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $object = new JsEncodingObject(); $object->title = 'New thing'; $object->indexes = array(5,6,7,8); $result = $this->JsEngine->object($object); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->object(array('default' => 0)); $expected = '{"default":0}'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->JsEngine->object(array( '2007' => array( @@ -838,11 +838,11 @@ class JsBaseEngineTest extends CakeTestCase { ) )); $expected = '{"2007":{"Spring":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}},"Fall":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}}},"2006":{"Spring":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}},"Fall":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}}}}'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); foreach (array('true' => true, 'false' => false, 'null' => null) as $expected => $data) { $result = $this->JsEngine->object($data); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } $object = array('title' => 'New thing', 'indexes' => array(5, 6, 7, 8), 'object' => array('inner' => array('value' => 1))); @@ -883,11 +883,11 @@ class JsBaseEngineTest extends CakeTestCase { $result = $JsEngine->testParseOptions(array('url' => '/posts/view/1', 'key' => 1)); $expected = 'key:1, url:"\\/posts\\/view\\/1"'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $JsEngine->testParseOptions(array('url' => '/posts/view/1', 'success' => 'doSuccess'), array('success')); $expected = 'success:doSuccess, url:"\\/posts\\/view\\/1"'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/View/Helper/MootoolsEngineHelperTest.php b/lib/Cake/Test/Case/View/Helper/MootoolsEngineHelperTest.php index d3cf5ac35..1069dac26 100644 --- a/lib/Cake/Test/Case/View/Helper/MootoolsEngineHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/MootoolsEngineHelperTest.php @@ -88,15 +88,15 @@ class MooEngineHelperTest extends CakeTestCase { $this->Moo->get('#myLink'); $result = $this->Moo->event('click', 'doClick', array('wrap' => false)); $expected = '$("myLink").addEvent("click", doClick);'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->event('click', 'this.setStyle("display", "");', array('stop' => false)); $expected = '$("myLink").addEvent("click", function (event) {this.setStyle("display", "");});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->event('click', 'this.setStyle("display", "none");'); $expected = "\$(\"myLink\").addEvent(\"click\", function (event) {event.stop();\nthis.setStyle(\"display\", \"none\");});"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * test dom ready event creation @@ -106,7 +106,7 @@ class MooEngineHelperTest extends CakeTestCase { function testDomReady() { $result = $this->Moo->domReady('foo.name = "bar";'); $expected = 'window.addEvent("domready", function (event) {foo.name = "bar";});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * test Each method @@ -117,7 +117,7 @@ class MooEngineHelperTest extends CakeTestCase { $this->Moo->get('#foo'); $result = $this->Moo->each('item.setStyle("display", "none");'); $expected = '$("foo").each(function (item, index) {item.setStyle("display", "none");});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * test Effect generation @@ -128,35 +128,35 @@ class MooEngineHelperTest extends CakeTestCase { $this->Moo->get('#foo'); $result = $this->Moo->effect('show'); $expected = '$("foo").setStyle("display", "");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->effect('hide'); $expected = '$("foo").setStyle("display", "none");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->effect('fadeIn'); $expected = '$("foo").fade("in");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->effect('fadeOut'); $expected = '$("foo").fade("out");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->effect('slideIn'); $expected = '$("foo").slide("in");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->effect('slideOut'); $expected = '$("foo").slide("out");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->effect('slideOut', array('speed' => 'fast')); $expected = '$("foo").set("slide", {duration:"short"}).slide("out");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->effect('slideOut', array('speed' => 'slow')); $expected = '$("foo").set("slide", {duration:"long"}).slide("out");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * Test Request Generation @@ -166,11 +166,11 @@ class MooEngineHelperTest extends CakeTestCase { function testRequest() { $result = $this->Moo->request(array('controller' => 'posts', 'action' => 'view', 1)); $expected = 'var jsRequest = new Request({url:"\\/posts\\/view\\/1"}).send();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->request('/posts/view/1', array('update' => 'content')); $expected = 'var jsRequest = new Request.HTML({update:"content", url:"\\/posts\\/view\\/1"}).send();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->request('/people/edit/1', array( 'method' => 'post', @@ -181,7 +181,7 @@ class MooEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsRequest = new Request.JSON({method:"post", onComplete:doSuccess, onFailure:handleError, url:"\\/people\\/edit\\/1"}).send({"name":"jim","height":"185cm"});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->request('/people/edit/1', array( 'method' => 'post', @@ -190,7 +190,7 @@ class MooEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsRequest = new Request.HTML({method:"post", onComplete:doSuccess, update:"update-zone", url:"\\/people\\/edit\\/1"}).send();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->request('/people/edit/1', array( 'method' => 'post', @@ -202,7 +202,7 @@ class MooEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsRequest = new Request.HTML({method:"post", onComplete:doComplete, onFailure:doFailure, onRequest:doBefore, onSuccess:doSuccess, update:"update-zone", url:"\\/people\\/edit\\/1"}).send();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->request('/people/edit/1', array( 'method' => 'post', @@ -216,7 +216,7 @@ class MooEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsRequest = new Request.HTML({method:"post", onComplete:doComplete, onFailure:doFailure, onRequest:doBefore, onSuccess:doSuccess, update:"update-zone", url:"\\/people\\/edit\\/1"}).send($("foo").toQueryString());'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->request('/people/edit/1', array( 'method' => 'post', @@ -226,7 +226,7 @@ class MooEngineHelperTest extends CakeTestCase { 'update' => '#update-zone', )); $expected = 'var jsRequest = new Request.HTML({method:"post", onComplete:function () {doComplete}, onRequest:function () {doBefore}, onSuccess:function (responseText, responseXML) {doSuccess}, update:"update-zone", url:"\\/people\\/edit\\/1"}).send();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * test sortable list generation @@ -244,7 +244,7 @@ class MooEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsSortable = new Sortables($("myList"), {constrain:"parent", onComplete:onStop, onSort:onSort, onStart:onStart, snap:5});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * test drag() method @@ -261,7 +261,7 @@ class MooEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$("drag-me").makeDraggable({onComplete:onStop, onDrag:onDrag, onStart:onStart, snap:[10,10]});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * test drop() method @@ -285,7 +285,7 @@ class MooEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$("my-drag").makeDraggable({droppables:$("drop-me"), onDrop:onDrop, onEnter:onHover, onLeave:onLeave});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertEqual($this->Moo->selection, '$("drop-me")'); $result = $this->Moo->drop(array( @@ -295,7 +295,7 @@ class MooEngineHelperTest extends CakeTestCase { 'drag' => '#my-drag', )); $expected = '$("my-drag").makeDraggable({droppables:$("drop-me"), onDrop:function (element, droppable, event) {onDrop}, onEnter:function (element, droppable) {onHover}, onLeave:function (element, droppable) {onLeave}});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * test slider generation @@ -312,7 +312,7 @@ class MooEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsSlider = new Slider($("slider"), $("my-handle"), {mode:"horizontal", onChange:onChange, onComplete:onComplete});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertEqual($this->Moo->selection, '$("slider")'); $this->Moo->get('#slider'); @@ -326,7 +326,7 @@ class MooEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsSlider = new Slider($("slider"), $("my-handle"), {mode:"horizontal", onChange:onChange, onComplete:onComplete, range:[10,40]});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Moo->get('#slider'); $result = $this->Moo->slider(array( @@ -336,7 +336,7 @@ class MooEngineHelperTest extends CakeTestCase { 'direction' => 'horizontal', )); $expected = 'var jsSlider = new Slider($("slider"), $("my-handle"), {mode:"horizontal", onChange:function (step) {change;}, onComplete:function (event) {complete;}});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** * test the serializeForm implementation. @@ -347,18 +347,18 @@ class MooEngineHelperTest extends CakeTestCase { $this->Moo->get('#element'); $result = $this->Moo->serializeForm(array('isForm' => true)); $expected = '$("element").toQueryString();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->serializeForm(array('isForm' => true, 'inline' => true)); $expected = '$("element").toQueryString()'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->serializeForm(array('isForm' => false)); $expected = '$($("element").form).toQueryString();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Moo->serializeForm(array('isForm' => false, 'inline' => true)); $expected = '$($("element").form).toQueryString()'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php b/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php index 12b220cc1..278441de5 100644 --- a/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php @@ -133,39 +133,39 @@ class NumberHelperTest extends CakeTestCase { $result = $this->Number->currency(1, null, array('wholeSymbol' => '$ ')); $expected = '$ 1.00'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->currency(1, null, array('wholeSymbol' => ' $', 'wholePosition' => 'after')); $expected = '1.00 $'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->currency(.2, null, array('wholeSymbol' => ' $', 'wholePosition' => 'after', 'fractionSymbol' => 'cents')); $expected = '20cents'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->currency(.2, null, array('wholeSymbol' => ' $', 'wholePosition' => 'after', 'fractionSymbol' => 'cents', 'fractionPosition' => 'before')); $expected = 'cents20'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->currency(311, 'USD', array('wholePosition' => 'after')); $expected = '311.00$'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->currency(.2, 'EUR'); $expected = '€0,20'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->currency(12, null, array('wholeSymbol' => ' dollars', 'wholePosition' => 'after', 'fractionSymbol' => ' cents', 'fractionPosition' => 'after')); $expected = '12.00 dollars'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->currency(.12, null, array('wholeSymbol' => ' dollars', 'wholePosition' => 'after', 'fractionSymbol' => ' cents', 'fractionPosition' => 'after')); $expected = '12 cents'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->currency(.5, null, array('fractionSymbol' => false, 'fractionPosition' => 'before', 'wholeSymbol' => '$')); $expected = '$0.50'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -381,7 +381,7 @@ class NumberHelperTest extends CakeTestCase { $result = $this->Number->currency('0.35', 'GBP'); $expected = '35p'; $this->assertEqual($expected, $result); - + $result = $this->Number->currency('0.35', 'EUR'); $expected = '€0,35'; $this->assertEqual($expected, $result); @@ -460,18 +460,18 @@ class NumberHelperTest extends CakeTestCase { function testToPercentage() { $result = $this->Number->toPercentage(45, 0); $expected = '45%'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->toPercentage(45, 2); $expected = '45.00%'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->toPercentage(0, 0); $expected = '0%'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Number->toPercentage(0, 4); $expected = '0.0000%'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php index 37c6a279c..d9ea710a8 100644 --- a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php @@ -115,14 +115,14 @@ class PaginatorHelperTest extends CakeTestCase { $this->Paginator->request->params['paging']['Article']['page'] = 1; $result = $this->Paginator->next('Next', array(), true); $expected = 'Next'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Paginator->request->params['paging']['Article']['prevPage'] = false; $result = $this->Paginator->prev('prev', array('update' => 'theList', 'indicator' => 'loading', 'url' => array('controller' => 'posts')), null, array('class' => 'disabled', 'tag' => 'span')); $expected = array( 'span' => array('class' => 'disabled'), 'prev', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -154,14 +154,14 @@ class PaginatorHelperTest extends CakeTestCase { 'paramType' => 'named' ) ); - + $result = $this->Paginator->sort('title'); $expected = array( 'a' => array('href' => '/officespace/accounts/index/param/page:1/sort:title/direction:asc'), 'Title', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->sort('date'); $expected = array( @@ -169,7 +169,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Date', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->sort('title', 'TestTitle'); $expected = array( @@ -177,7 +177,7 @@ class PaginatorHelperTest extends CakeTestCase { 'TestTitle', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->sort('title', array('asc' => 'ascending', 'desc' => 'descending')); $expected = array( @@ -185,7 +185,7 @@ class PaginatorHelperTest extends CakeTestCase { 'ascending', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Article']['options']['sort'] = 'title'; $result = $this->Paginator->sort('title', array('asc' => 'ascending', 'desc' => 'descending')); @@ -194,7 +194,7 @@ class PaginatorHelperTest extends CakeTestCase { 'descending', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Article']['options']['order'] = array('Article.title' => 'desc'); $this->Paginator->request->params['paging']['Article']['options']['sort'] = null; @@ -252,7 +252,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Article.full Name', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->sort('full_name'); $expected = array( @@ -260,7 +260,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Full Name', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Article']['options']['order'] = array('full_name' => 'desc'); $result = $this->Paginator->sort('Article.full_name'); @@ -269,7 +269,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Article.full Name', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->sort('full_name'); $expected = array( @@ -277,7 +277,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Full Name', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -302,7 +302,7 @@ class PaginatorHelperTest extends CakeTestCase { 'TestTitle', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->sort('title', array('asc' => 'ascending', 'desc' => 'descending'), array('direction' => 'desc')); $expected = array( @@ -310,7 +310,7 @@ class PaginatorHelperTest extends CakeTestCase { 'descending', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -334,7 +334,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Title', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Article']['options']['order'] = array('Article.title' => 'asc'); @@ -344,7 +344,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Title', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Article']['options']['order'] = array('Account.title' => 'asc'); $result = $this->Paginator->sort('title'); @@ -353,7 +353,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Title', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -385,64 +385,64 @@ class PaginatorHelperTest extends CakeTestCase { $result = $this->Paginator->sortDir(); $expected = 'asc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Paginator->request->params['paging']['Article']['options']['order'] = array('Article.title' => 'desc'); $result = $this->Paginator->sortDir(); $expected = 'desc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); unset($this->Paginator->request->params['paging']['Article']['options']); $this->Paginator->request->params['paging']['Article']['options']['order'] = array('Article.title' => 'asc'); $result = $this->Paginator->sortDir(); $expected = 'asc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); unset($this->Paginator->request->params['paging']['Article']['options']); $this->Paginator->request->params['paging']['Article']['options']['order'] = array('title' => 'desc'); $result = $this->Paginator->sortDir(); $expected = 'desc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); unset($this->Paginator->request->params['paging']['Article']['options']); $this->Paginator->request->params['paging']['Article']['options']['order'] = array('title' => 'asc'); $result = $this->Paginator->sortDir(); $expected = 'asc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); unset($this->Paginator->request->params['paging']['Article']['options']); $this->Paginator->request->params['paging']['Article']['options']['direction'] = 'asc'; $result = $this->Paginator->sortDir(); $expected = 'asc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); unset($this->Paginator->request->params['paging']['Article']['options']); $this->Paginator->request->params['paging']['Article']['options']['direction'] = 'desc'; $result = $this->Paginator->sortDir(); $expected = 'desc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); unset($this->Paginator->request->params['paging']['Article']['options']); $result = $this->Paginator->sortDir('Article', array('direction' => 'asc')); $expected = 'asc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Paginator->sortDir('Article', array('direction' => 'desc')); $expected = 'desc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Paginator->sortDir('Article', array('direction' => 'asc')); $expected = 'asc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -469,7 +469,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); Router::reload(); Router::setRequestInfo(array( @@ -484,7 +484,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Title', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->options(array('url' => array('param'))); $result = $this->Paginator->sort('Article.title', 'Title'); @@ -493,7 +493,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Title', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -509,7 +509,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Controller', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->url(); $this->assertEqual($result, '/index/page:1'); @@ -554,7 +554,7 @@ class PaginatorHelperTest extends CakeTestCase { $result = $this->Paginator->url($options); $expected = '/members/posts/index/page:2'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Paginator->sort('name', null, array('url' => $options)); $expected = array( @@ -562,7 +562,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Name', '/a' ); - $this->assertTags($result, $expected, true); + $this->assertTags($expected, $result, true); $result = $this->Paginator->next('next', array('url' => $options)); $expected = array( @@ -572,7 +572,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->prev('prev', array('url' => $options)); $expected = array( @@ -582,17 +582,17 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $options = array('members' => true, 'controller' => 'posts', 'order' => array('name' => 'desc')); $result = $this->Paginator->url($options); $expected = '/members/posts/index/page:2/sort:name/direction:desc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $options = array('controller' => 'posts', 'order' => array('Article.name' => 'desc')); $result = $this->Paginator->url($options); $expected = '/posts/index/page:2/sort:Article.name/direction:desc'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Configure::write('Routing', $_back); } @@ -663,8 +663,8 @@ class PaginatorHelperTest extends CakeTestCase { 'page' => 1, 'current' => 3, 'count' => 13, 'prevPage' => false, 'nextPage' => true, 'pageCount' => 8, 'options' => array( - 'page' => 1, - 'order' => array(), + 'page' => 1, + 'order' => array(), 'conditions' => array() ), 'paramType' => 'named' @@ -681,7 +681,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Title', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->numbers(); $expected = array( @@ -699,7 +699,7 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/articles/index/2/page:7/foo:bar')), '7', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->next('Next'); $expected = array( @@ -709,7 +709,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -739,7 +739,7 @@ class PaginatorHelperTest extends CakeTestCase { '<< Previous', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->prev('<< Previous', null, null, array('class' => 'disabled', 'tag' => 'div')); $expected = array( @@ -747,7 +747,7 @@ class PaginatorHelperTest extends CakeTestCase { '<< Previous', '/div' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Client']['page'] = 2; $this->Paginator->request->params['paging']['Client']['prevPage'] = true; @@ -759,7 +759,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->next('Next'); $expected = array( @@ -769,7 +769,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->next('Next', array('tag' => 'li')); $expected = array( @@ -779,7 +779,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/li' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->prev('<< Previous', array('escape' => true)); $expected = array( @@ -789,7 +789,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->prev('<< Previous', array('escape' => false)); $expected = array( @@ -799,18 +799,18 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( 'page' => 1, 'current' => 1, - 'count' => 13, - 'prevPage' => false, - 'nextPage' => true, + 'count' => 13, + 'prevPage' => false, + 'nextPage' => true, 'pageCount' => 5, 'options' => array( - 'page' => 1, + 'page' => 1, ), 'paramType' => 'named' ) @@ -822,7 +822,7 @@ class PaginatorHelperTest extends CakeTestCase { '<strong>Disabled</strong>', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->prev('<< Previous', null, 'Disabled', array('escape' => true)); $expected = array( @@ -830,7 +830,7 @@ class PaginatorHelperTest extends CakeTestCase { '<strong>Disabled</strong>', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->prev('<< Previous', null, 'Disabled', array('escape' => false)); $expected = array( @@ -838,19 +838,19 @@ class PaginatorHelperTest extends CakeTestCase { 'assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 1, - 'current' => 3, - 'count' => 13, - 'prevPage' => false, - 'nextPage' => true, + 'page' => 1, + 'current' => 3, + 'count' => 13, + 'prevPage' => false, + 'nextPage' => true, 'pageCount' => 5, 'options' => array( - 'page' => 1, - 'limit' => 3, + 'page' => 1, + 'limit' => 3, 'order' => array('Client.name' => 'DESC'), ), 'paramType' => 'named' @@ -871,7 +871,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected, true); + $this->assertTags($expected, $result, true); $result = $this->Paginator->next('Next'); $expected = array( @@ -885,19 +885,19 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 2, - 'current' => 1, - 'count' => 13, - 'prevPage' => true, - 'nextPage' => false, + 'page' => 2, + 'current' => 1, + 'count' => 13, + 'prevPage' => true, + 'nextPage' => false, 'pageCount' => 2, 'options' => array( - 'page' => 2, - 'limit' => 10, + 'page' => 2, + 'limit' => 10, 'order' => array(), 'conditions' => array() ), @@ -912,7 +912,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( @@ -934,7 +934,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -946,11 +946,11 @@ class PaginatorHelperTest extends CakeTestCase { function testPagingLinksOptionsReplaceEmptyDisabledOptions() { $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 1, - 'current' => 3, - 'count' => 13, + 'page' => 1, + 'current' => 3, + 'count' => 13, 'prevPage' => false, - 'nextPage' => true, + 'nextPage' => true, 'pageCount' => 5, 'options' => array( 'page' => 1, @@ -964,7 +964,7 @@ class PaginatorHelperTest extends CakeTestCase { 'preg:/<< Previous/', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->next('Next >>', array('escape' => false)); $expected = array( @@ -974,7 +974,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -989,26 +989,26 @@ class PaginatorHelperTest extends CakeTestCase { // Multiple Model Paginate $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 1, + 'page' => 1, 'current' => 3, - 'count' => 13, - 'prevPage' => false, - 'nextPage' => true, + 'count' => 13, + 'prevPage' => false, + 'nextPage' => true, 'pageCount' => 5, 'options' => array( - 'page' => 1, + 'page' => 1, ), 'paramType' => 'named' ), 'Server' => array( - 'page' => 1, - 'current' => 1, - 'count' => 5, - 'prevPage' => false, - 'nextPage' => false, + 'page' => 1, + 'current' => 1, + 'count' => 5, + 'prevPage' => false, + 'nextPage' => false, 'pageCount' => 5, 'options' => array( - 'page' => 1, + 'page' => 1, ), 'paramType' => 'named' ) @@ -1021,13 +1021,13 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->next('Next', array('model' => 'Server'), 'No Next', array('model' => 'Server')); $expected = array( 'span' => array('class' => 'next'), 'No Next', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1043,7 +1043,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Sort by title on page 5', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Article']['options']['page'] = 2; $result = $this->Paginator->link('Sort by title', array('sort' => 'title', 'direction' => 'desc')); @@ -1052,7 +1052,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Sort by title', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Article']['options']['page'] = 4; $result = $this->Paginator->link('Sort by title on page 4', array('sort' => 'Article.title', 'direction' => 'desc')); @@ -1061,7 +1061,7 @@ class PaginatorHelperTest extends CakeTestCase { 'Sort by title on page 4', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1111,11 +1111,11 @@ class PaginatorHelperTest extends CakeTestCase { function testNumbers() { $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 8, - 'current' => 3, - 'count' => 30, - 'prevPage' => false, - 'nextPage' => 2, + 'page' => 8, + 'current' => 3, + 'count' => 30, + 'prevPage' => false, + 'nextPage' => 2, 'pageCount' => 15, 'options' => array( 'page' => 1, @@ -1143,7 +1143,7 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:12')), '12', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->numbers(array('tag' => 'li')); $expected = array( @@ -1165,7 +1165,7 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('li' => array()), array('a' => array('href' => '/index/page:12')), '12', '/a', '/li', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->numbers(array('tag' => 'li', 'separator' => false)); $expected = array( @@ -1179,7 +1179,7 @@ class PaginatorHelperTest extends CakeTestCase { array('li' => array()), array('a' => array('href' => '/index/page:11')), '11', '/a', '/li', array('li' => array()), array('a' => array('href' => '/index/page:12')), '12', '/a', '/li', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->numbers(true); $expected = array( @@ -1205,15 +1205,15 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:15', 'rel' => 'last')), 'last', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 1, - 'current' => 3, - 'count' => 30, - 'prevPage' => false, - 'nextPage' => 2, + 'page' => 1, + 'current' => 3, + 'count' => 30, + 'prevPage' => false, + 'nextPage' => 2, 'pageCount' => 15, 'options' => array( 'page' => 1, @@ -1241,16 +1241,16 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:9')), '9', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 14, - 'current' => 3, - 'count' => 30, - 'prevPage' => false, - 'nextPage' => 2, + 'page' => 14, + 'current' => 3, + 'count' => 30, + 'prevPage' => false, + 'nextPage' => 2, 'pageCount' => 15, 'options' => array( 'page' => 1, @@ -1278,15 +1278,15 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:15')), '15', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 2, - 'current' => 3, - 'count' => 27, - 'prevPage' => false, - 'nextPage' => 2, + 'page' => 2, + 'current' => 3, + 'count' => 27, + 'prevPage' => false, + 'nextPage' => 2, 'pageCount' => 9, 'options' => array( 'page' => 1, @@ -1315,7 +1315,7 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:9')), '9', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->numbers(array('last' => 1)); $expected = array( @@ -1337,15 +1337,15 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:9')), '9', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 15, - 'current' => 3, - 'count' => 30, - 'prevPage' => false, - 'nextPage' => 2, + 'page' => 15, + 'current' => 3, + 'count' => 30, + 'prevPage' => false, + 'nextPage' => 2, 'pageCount' => 15, 'options' => array( 'page' => 1, @@ -1377,15 +1377,15 @@ class PaginatorHelperTest extends CakeTestCase { array('span' => array('class' => 'current')), '15', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 10, - 'current' => 3, - 'count' => 30, - 'prevPage' => false, - 'nextPage' => 2, + 'page' => 10, + 'current' => 3, + 'count' => 30, + 'prevPage' => false, + 'nextPage' => 2, 'pageCount' => 15, 'options' => array( 'page' => 1, @@ -1418,18 +1418,18 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:15')), '15', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 6, - 'current' => 15, - 'count' => 623, - 'prevPage' => 1, - 'nextPage' => 1, + 'page' => 6, + 'current' => 15, + 'count' => 623, + 'prevPage' => 1, + 'nextPage' => 1, 'pageCount' => 42, 'options' => array( - 'page' => 6, + 'page' => 6, ), 'paramType' => 'named' ) @@ -1459,15 +1459,15 @@ class PaginatorHelperTest extends CakeTestCase { '...', array('span' => array()), array('a' => array('href' => '/index/page:42')), '42', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 37, - 'current' => 15, - 'count' => 623, - 'prevPage' => 1, - 'nextPage' => 1, + 'page' => 37, + 'current' => 15, + 'count' => 623, + 'prevPage' => 1, + 'nextPage' => 1, 'pageCount' => 42, 'options' => array( 'page' => 37, @@ -1500,7 +1500,7 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:42')), '42', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( @@ -1525,19 +1525,19 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:3')), '3', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 2, - 'current' => 10, - 'count' => 31, - 'prevPage' => true, - 'nextPage' => true, + 'page' => 2, + 'current' => 10, + 'count' => 31, + 'prevPage' => true, + 'nextPage' => true, 'pageCount' => 4, 'options' => array( - 'page' => 1, - 'order' => array('Client.name' => 'DESC'), + 'page' => 1, + 'order' => array('Client.name' => 'DESC'), ), 'paramType' => 'named' ) @@ -1552,19 +1552,19 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:4/sort:Client.name/direction:DESC')), '4', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 4895, - 'current' => 10, - 'count' => 48962, - 'prevPage' => 1, - 'nextPage' => 1, + 'page' => 4895, + 'current' => 10, + 'count' => 48962, + 'prevPage' => 1, + 'nextPage' => 1, 'pageCount' => 4897, 'options' => array( - 'page' => 4894, + 'page' => 4894, ), 'paramType' => 'named' ) @@ -1584,7 +1584,7 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Client']['page'] = 3; @@ -1602,7 +1602,7 @@ class PaginatorHelperTest extends CakeTestCase { ' | ', array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->numbers(array('first' => 2, 'modulus' => 2, 'last' => 2, 'separator' => ' - ')); $expected = array( @@ -1618,7 +1618,7 @@ class PaginatorHelperTest extends CakeTestCase { ' - ', array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 5, 'last' => 5, 'separator' => ' - ')); $expected = array( @@ -1644,7 +1644,7 @@ class PaginatorHelperTest extends CakeTestCase { ' - ', array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Client']['page'] = 4893; $result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 4, 'last' => 5, 'separator' => ' - ')); @@ -1673,7 +1673,7 @@ class PaginatorHelperTest extends CakeTestCase { ' - ', array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Client']['page'] = 58; $result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 4, 'last' => 5, 'separator' => ' - ')); @@ -1708,7 +1708,7 @@ class PaginatorHelperTest extends CakeTestCase { ' - ', array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Client']['page'] = 5; $result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 4, 'last' => 5, 'separator' => ' - ')); @@ -1737,7 +1737,7 @@ class PaginatorHelperTest extends CakeTestCase { ' - ', array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Client']['page'] = 3; $result = $this->Paginator->numbers(array('first' => 2, 'modulus' => 2, 'last' => 2, 'separator' => ' - ', 'ellipsis' => ' ~~~ ')); @@ -1754,7 +1754,7 @@ class PaginatorHelperTest extends CakeTestCase { ' - ', array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Client']['page'] = 3; $result = $this->Paginator->numbers(array('first' => 2, 'modulus' => 2, 'last' => 2, 'separator' => ' - ', 'ellipsis' => '...')); @@ -1771,7 +1771,7 @@ class PaginatorHelperTest extends CakeTestCase { ' - ', array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1788,7 +1788,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/li' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->last(2, array('tag' => 'li')); @@ -1802,7 +1802,7 @@ class PaginatorHelperTest extends CakeTestCase { array('a' => array('href' => '/index/page:7')), '7', '/a', '/li', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1816,7 +1816,7 @@ class PaginatorHelperTest extends CakeTestCase { $result = $this->Paginator->last(); $expected = ''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1829,7 +1829,7 @@ class PaginatorHelperTest extends CakeTestCase { $result = $this->Paginator->first(); $expected = ''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -1847,12 +1847,12 @@ class PaginatorHelperTest extends CakeTestCase { ' array( 'href' => FULL_BASE_URL . '/index/page:1/sort:Article.title/direction:DESC', 'rel' => 'first' - )), - '<< first', + )), + '<< first', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -1869,7 +1869,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->first(2); $expected = array( @@ -1881,8 +1881,8 @@ class PaginatorHelperTest extends CakeTestCase { array('a' => array('href' => '/index/page:2')), '2', '/a', '/span' ); - $this->assertTags($result, $expected); - + $this->assertTags($expected, $result); + $this->Paginator->request->params['paging']['Article']['page'] = 2; $result = $this->Paginator->first(3); $this->assertEquals('', $result, 'When inside the first links range, no links should be made'); @@ -1903,7 +1903,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->last(1); $expected = array( @@ -1914,7 +1914,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->request->params['paging']['Article']['page'] = 6; @@ -1929,12 +1929,12 @@ class PaginatorHelperTest extends CakeTestCase { array('a' => array('href' => '/index/page:7')), '7', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->last(3); $this->assertEquals('', $result, 'When inside the last links range, no links should be made'); } - + /** * undocumented function * @@ -1943,15 +1943,15 @@ class PaginatorHelperTest extends CakeTestCase { function testLastOptions() { $this->Paginator->request->params['paging'] = array( 'Client' => array( - 'page' => 4, - 'current' => 3, - 'count' => 30, + 'page' => 4, + 'current' => 3, + 'count' => 30, 'prevPage' => false, - 'nextPage' => 2, + 'nextPage' => 2, 'pageCount' => 15, 'options' => array( 'page' => 1, - 'order' => array('Client.name' => 'DESC'), + 'order' => array('Client.name' => 'DESC'), ), 'paramType' => 'named' ) @@ -1963,12 +1963,12 @@ class PaginatorHelperTest extends CakeTestCase { array('a' => array( 'href' => '/index/page:15/sort:Client.name/direction:DESC', 'rel' => 'last' - )), + )), 'last >>', '/a', '/span', ); - $this->assertTags($result, $expected); - + $this->assertTags($expected, $result); + $result = $this->Paginator->last(1); $expected = array( '...', @@ -1976,7 +1976,7 @@ class PaginatorHelperTest extends CakeTestCase { array('a' => array('href' => '/index/page:15/sort:Client.name/direction:DESC')), '15', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->last(2); $expected = array( @@ -1989,7 +1989,7 @@ class PaginatorHelperTest extends CakeTestCase { array('a' => array('href' => '/index/page:15/sort:Client.name/direction:DESC')), '15', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Paginator->last(2, array('ellipsis' => '...')); $expected = array( @@ -2002,7 +2002,7 @@ class PaginatorHelperTest extends CakeTestCase { array('a' => array('href' => '/index/page:15/sort:Client.name/direction:DESC')), '15', '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2033,29 +2033,29 @@ class PaginatorHelperTest extends CakeTestCase { $result = $this->Paginator->counter($input); $expected = 'Page 1 of 5, showing 3 records out of 13 total, starting on record 1, '; $expected .= 'ending on 3'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $input = 'Page {:page} of {:pages}, showing {:current} records out of {:count} total, '; $input .= 'starting on record {:start}, ending on {:end}'; $result = $this->Paginator->counter($input); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $input = 'Page %page% of %pages%'; $result = $this->Paginator->counter($input); $expected = 'Page 1 of 5'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Paginator->counter(array('format' => $input)); $expected = 'Page 1 of 5'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Paginator->counter(array('format' => 'pages')); $expected = '1 of 5'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Paginator->counter(array('format' => 'range')); $expected = '1 - 3 of 13'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -2098,21 +2098,21 @@ class PaginatorHelperTest extends CakeTestCase { $expected = array( 'a' => array('href' => '/my_plugin/magazines/index/page:3'), 'Page 3', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->options(array('url' => array('action' => 'another_index'))); $result = $this->Paginator->link('Page 3', array('page' => 3)); $expected = array( 'a' => array('href' => '/my_plugin/magazines/another_index/page:3'), 'Page 3', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->options(array('url' => array('controller' => 'issues'))); $result = $this->Paginator->link('Page 3', array('page' => 3)); $expected = array( 'a' => array('href' => '/my_plugin/issues/index/page:3'), 'Page 3', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $this->Paginator->options(array('url' => array('plugin' => null))); $result = $this->Paginator->link('Page 3', array('page' => 3)); @@ -2125,7 +2125,7 @@ class PaginatorHelperTest extends CakeTestCase { $expected = array( 'a' => array('href' => '/issues/index/page:3'), 'Page 3', '/a' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2164,7 +2164,7 @@ class PaginatorHelperTest extends CakeTestCase { '/a', '/span', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -2175,7 +2175,7 @@ class PaginatorHelperTest extends CakeTestCase { function testAjaxLinkGenerationNumbers() { $this->Paginator->Js->expectCallCount('link', 2); $result = $this->Paginator->numbers(array( - 'modulus'=> '2', + 'modulus'=> '2', 'url'=> array('controller' => 'projects', 'action' => 'sort'), 'update' => 'list' )); @@ -2249,7 +2249,7 @@ class PaginatorHelperTest extends CakeTestCase { $this->Paginator->request->params['paging']['Article']['page'] = 2; $this->Paginator->request->params['paging']['Article']['nextPage'] = true; $this->Paginator->request->params['paging']['Article']['prevPage'] = true; - + $result = $this->Paginator->next('Next'); $expected = array( 'assertTags($result, $expected); - + $this->assertTags($expected, $result); + $result = $this->Paginator->prev('Prev'); $expected = array( 'assertTags($result, $expected); + $this->assertTags($expected, $result); } /** diff --git a/lib/Cake/Test/Case/View/Helper/PrototypeEngineHelperTest.php b/lib/Cake/Test/Case/View/Helper/PrototypeEngineHelperTest.php index 90b6462d6..d0937c753 100644 --- a/lib/Cake/Test/Case/View/Helper/PrototypeEngineHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/PrototypeEngineHelperTest.php @@ -87,15 +87,15 @@ class PrototypeEngineHelperTest extends CakeTestCase { $this->Proto->get('#myLink'); $result = $this->Proto->event('click', 'doClick', array('wrap' => false)); $expected = '$("myLink").observe("click", doClick);'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->event('click', 'Element.hide(this);', array('stop' => false)); $expected = '$("myLink").observe("click", function (event) {Element.hide(this);});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->event('click', 'Element.hide(this);'); $expected = "\$(\"myLink\").observe(\"click\", function (event) {event.stop();\nElement.hide(this);});"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -106,7 +106,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { function testDomReady() { $result = $this->Proto->domReady('foo.name = "bar";'); $expected = 'document.observe("dom:loaded", function (event) {foo.name = "bar";});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -118,7 +118,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { $this->Proto->get('#foo li'); $result = $this->Proto->each('item.hide();'); $expected = '$$("#foo li").each(function (item, index) {item.hide();});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -130,51 +130,51 @@ class PrototypeEngineHelperTest extends CakeTestCase { $this->Proto->get('#foo'); $result = $this->Proto->effect('show'); $expected = '$("foo").show();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('hide'); $expected = '$("foo").hide();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('fadeIn'); $expected = '$("foo").appear();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('fadeIn', array('speed' => 'fast')); $expected = '$("foo").appear({duration:0.50000000000});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('fadeIn', array('speed' => 'slow')); $expected = '$("foo").appear({duration:2});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('fadeOut'); $expected = '$("foo").fade();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('fadeOut', array('speed' => 'fast')); $expected = '$("foo").fade({duration:0.50000000000});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('fadeOut', array('speed' => 'slow')); $expected = '$("foo").fade({duration:2});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('slideIn'); $expected = 'Effect.slideDown($("foo"));'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('slideOut'); $expected = 'Effect.slideUp($("foo"));'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('slideOut', array('speed' => 'fast')); $expected = 'Effect.slideUp($("foo"), {duration:0.50000000000});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->effect('slideOut', array('speed' => 'slow')); $expected = 'Effect.slideUp($("foo"), {duration:2});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -185,7 +185,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { function testRequest() { $result = $this->Proto->request(array('controller' => 'posts', 'action' => 'view', 1)); $expected = 'var jsRequest = new Ajax.Request("/posts/view/1");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->request('/posts/view/1', array( 'method' => 'post', @@ -197,11 +197,11 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsRequest = new Ajax.Request("/posts/view/1", {method:"post", onComplete:doComplete, onCreate:doBefore, onFailure:doError, onSuccess:doSuccess, parameters:{"name":"jim","height":"185cm"}});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->request('/posts/view/1', array('update' => 'content')); $expected = 'var jsRequest = new Ajax.Updater("content", "/posts/view/1");'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->request('/people/edit/1', array( 'method' => 'post', @@ -210,7 +210,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsRequest = new Ajax.Updater("update-zone", "/people/edit/1", {method:"post", onComplete:doSuccess});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->request('/people/edit/1', array( 'method' => 'post', @@ -221,7 +221,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsRequest = new Ajax.Request("/people/edit/1", {method:"post", onComplete:doSuccess, onFailure:handleError, parameters:{"name":"jim","height":"185cm"}});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->request('/people/edit/1', array( 'method' => 'post', @@ -233,7 +233,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsRequest = new Ajax.Request("/people/edit/1", {method:"post", onComplete:doSuccess, onFailure:handleError, parameters:$("element").serialize()});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->request('/people/edit/1', array( 'method' => 'post', @@ -243,7 +243,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'error' => 'handleError();', )); $expected = 'var jsRequest = new Ajax.Request("/people/edit/1", {method:"post", onComplete:function (transport) {doComplete();}, onCreate:function (transport) {doBefore();}, onFailure:function (response, jsonHeader) {handleError();}, onSuccess:function (response, jsonHeader) {doSuccess();}});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->request('/people/edit/1', array( 'async' => false, @@ -254,7 +254,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'error' => 'handleError();', )); $expected = 'var jsRequest = new Ajax.Request("/people/edit/1", {asynchronous:false, method:"post", onComplete:function (transport) {doComplete();}, onCreate:function (transport) {doBefore();}, onFailure:function (response, jsonHeader) {handleError();}, onSuccess:function (response, jsonHeader) {doSuccess();}});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Proto->get('#submit'); $result = $this->Proto->request('/users/login', array( @@ -281,7 +281,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsSortable = Sortable.create($("myList"), {onChange:onSort, onUpdate:onComplete});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -300,7 +300,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsDrag = new Draggable($("element"), {onDrag:onDrag, onEnd:onStop, onStart:onStart, snap:[10,10]});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Proto->get('div.dragger'); $result = $this->Proto->drag(array( @@ -311,7 +311,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = '$$("div.dragger").each(function (item, index) {new Draggable(item, {onDrag:onDrag, onEnd:onStop, onStart:onStart, snap:[10,10]});});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -328,7 +328,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'Droppables.add($("element"), {accept:".drag-me", onDrop:onDrop, onHover:onHover});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -347,7 +347,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'wrapCallbacks' => false )); $expected = 'var jsSlider = new Control.Slider($("handle"), $("element"), {axis:"horizontal", onChange:onComplete, onSlide:onChange, sliderValue:4});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Proto->get('#element'); $result = $this->Proto->slider(array( @@ -359,7 +359,7 @@ class PrototypeEngineHelperTest extends CakeTestCase { 'max' => 100 )); $expected = 'var jsSlider = new Control.Slider($("handle"), $("element"), {onChange:function (value) {complete();}, onSlide:function (value) {change();}, range:$R(10,100), sliderValue:4});'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -371,18 +371,18 @@ class PrototypeEngineHelperTest extends CakeTestCase { $this->Proto->get('#element'); $result = $this->Proto->serializeForm(array('isForm' => true)); $expected = '$("element").serialize();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->serializeForm(array('isForm' => true, 'inline' => true)); $expected = '$("element").serialize()'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->serializeForm(array('isForm' => false)); $expected = '$($("element").form).serialize();'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Proto->serializeForm(array('isForm' => false, 'inline' => true)); $expected = '$($("element").form).serialize()'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } } diff --git a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php index 1a4ba25e0..7ad0dc382 100644 --- a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php @@ -64,7 +64,7 @@ class RssHelperTest extends CakeTestCase { 'version' => '2.0' ) ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Rss->document(null, 'content'); $expected = array( @@ -73,7 +73,7 @@ class RssHelperTest extends CakeTestCase { ), 'content' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Rss->document(array('contrived' => 'parameter'), 'content'); $expected = array( @@ -83,7 +83,7 @@ class RssHelperTest extends CakeTestCase { ), 'content' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -113,7 +113,7 @@ class RssHelperTest extends CakeTestCase { 'content', '/channel' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -163,7 +163,7 @@ class RssHelperTest extends CakeTestCase { 'content-here', '/channel', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } function testChannelElementAttributes() { @@ -205,7 +205,7 @@ class RssHelperTest extends CakeTestCase { 'content-here', '/channel', ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -242,11 +242,11 @@ class RssHelperTest extends CakeTestCase { 'assertTags($result, $expected); + $this->assertTags($expected, $result); $result = $this->Rss->items(array()); $expected = ''; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -278,7 +278,7 @@ class RssHelperTest extends CakeTestCase { '/guid', '/item' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $item = array( 'title' => 'My Title', @@ -308,7 +308,7 @@ class RssHelperTest extends CakeTestCase { '/guid', '/item' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $item = array( 'title' => 'My Title & more' @@ -319,7 +319,7 @@ class RssHelperTest extends CakeTestCase { 'assertTags($result, $expected); + $this->assertTags($expected, $result); $item = array( 'title' => 'Foo bar', @@ -353,7 +353,7 @@ class RssHelperTest extends CakeTestCase { '/guid', '/item' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -377,7 +377,7 @@ class RssHelperTest extends CakeTestCase { '/title', '/item' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $item = array( 'category' => array( @@ -394,7 +394,7 @@ class RssHelperTest extends CakeTestCase { '/category', '/item' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $item = array( 'category' => array( @@ -420,7 +420,7 @@ class RssHelperTest extends CakeTestCase { '/category', '/item' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); $item = array( 'title' => array( @@ -476,7 +476,7 @@ class RssHelperTest extends CakeTestCase { '/category', '/item' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } /** @@ -514,6 +514,6 @@ class RssHelperTest extends CakeTestCase { ), '/item' ); - $this->assertTags($result, $expected); + $this->assertTags($expected, $result); } } diff --git a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php index 7dcb20bab..9e5a9e57e 100644 --- a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php @@ -124,12 +124,12 @@ class SessionHelperTest extends CakeTestCase { function testFlash() { $result = $this->Session->flash('flash'); $expected = '
This is a calling
'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertFalse($this->Session->check('Message.flash')); $expected = '
Recorded
'; $result = $this->Session->flash('classy'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); App::build(array( 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS) @@ -137,12 +137,12 @@ class SessionHelperTest extends CakeTestCase { $result = $this->Session->flash('notification'); $result = str_replace("\r\n", "\n", $result); $expected = "
\n\t

Alert!

\n\t

Notice!

\n\t

This is a test of the emergency broadcasting system

\n
"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertFalse($this->Session->check('Message.notification')); $result = $this->Session->flash('bare'); $expected = 'Bare message'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertFalse($this->Session->check('Message.bare')); } @@ -154,7 +154,7 @@ class SessionHelperTest extends CakeTestCase { function testFlashAttributes() { $result = $this->Session->flash('flash', array('params' => array('class' => 'test-message'))); $expected = '
This is a calling
'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->assertFalse($this->Session->check('Message.flash')); } diff --git a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php index f946945e6..d51e269cf 100644 --- a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php @@ -112,7 +112,7 @@ class TextHelperTest extends CakeTestCase { $expected = 'Ich saß in einem Café am Übergang'; $phrases = array('saß', 'café', 'übergang'); $result = $this->Text->highlight($text, $phrases, array('format' => '\1')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -205,32 +205,32 @@ class TextHelperTest extends CakeTestCase { $text = 'This is a test text with URL http://www.cakephp.org'; $expected = 'This is a test text with URL http://www.cakephp.org'; $result = $this->Text->autoLink($text); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $text = 'This is a test text with URL http://www.cakephp.org and some more text'; $expected = 'This is a test text with URL http://www.cakephp.org and some more text'; $result = $this->Text->autoLink($text); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $text = "This is a test text with URL http://www.cakephp.org\tand some more text"; $expected = "This is a test text with URL http://www.cakephp.org\tand some more text"; $result = $this->Text->autoLink($text); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $text = 'This is a test text with URL http://www.cakephp.org(and some more text)'; $expected = 'This is a test text with URL http://www.cakephp.org(and some more text)'; $result = $this->Text->autoLink($text); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $text = 'This is a test text with URL http://www.cakephp.org'; $expected = 'This is a test text with URL http://www.cakephp.org'; $result = $this->Text->autoLink($text, array('class'=>'link')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $text = 'This is a test text with URL http://www.cakephp.org'; $expected = 'This is a test text with URL http://www.cakephp.org'; $result = $this->Text->autoLink($text, array('class'=>'link', 'id'=>'MyLink')); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -274,12 +274,12 @@ class TextHelperTest extends CakeTestCase { $expected = 'Text with a url www.cot.ag/cuIb2Q and more'; $result = $this->Text->autoLinkUrls($text); $this->assertEqual($expected, $result); - + $text = 'Text with a url http://www.does--not--work.com and more'; $expected = 'Text with a url http://www.does--not--work.com and more'; $result = $this->Text->autoLinkUrls($text); $this->assertEqual($expected, $result); - + $text = 'Text with a url http://www.not--work.com and more'; $expected = 'Text with a url http://www.not--work.com and more'; $result = $this->Text->autoLinkUrls($text); @@ -302,7 +302,7 @@ class TextHelperTest extends CakeTestCase { $expected = 'Text with email@example.com address'; $result = $this->Text->autoLinkEmails($text); $this->assertPattern('#^' . $expected . '$#', $result); - + $text = "Text with o'hare._-bob@example.com address"; $expected = 'Text with o'hare._-bob@example.com address'; $result = $this->Text->autoLinkEmails($text); @@ -427,7 +427,7 @@ class TextHelperTest extends CakeTestCase { $result = $this->Text->toList(array( 'name1' => 'Dusty', 'name2' => 'Lucky')); $this->assertEqual($result, 'Dusty and Lucky'); - + $result = $this->Text->toList(array( 'test_0' => 'banana', 'test_1' => 'apple', 'test_2' => 'lemon')); $this->assertEqual($result, 'banana, apple and lemon'); } diff --git a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php index d1092d862..e1487dbd8 100644 --- a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php @@ -622,7 +622,7 @@ class TimeHelperTest extends CakeTestCase { $expected = time(); $result = $this->Time->fromString(time(), $yourTimezone); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -640,12 +640,12 @@ class TimeHelperTest extends CakeTestCase { $result = $this->Time->fromString('+1 hour'); $expected = strtotime('+1 hour'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $timezone = date('Z', time()); $result = $this->Time->fromString('+1 hour', $timezone); $expected = $this->Time->convert(strtotime('+1 hour'), $timezone); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -663,79 +663,79 @@ class TimeHelperTest extends CakeTestCase { $result = $this->Time->convertSpecifiers('%a', $time); $expected = 'jue'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%A', $time); $expected = 'jueves'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%c', $time); $expected = 'jue %d ene %Y %H:%M:%S %Z'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%C', $time); $expected = '20'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%D', $time); $expected = '%m/%d/%y'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%b', $time); $expected = 'ene'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%h', $time); $expected = 'ene'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%B', $time); $expected = 'enero'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%n', $time); $expected = "\n"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%n', $time); $expected = "\n"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%p', $time); $expected = 'AM'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%P', $time); $expected = 'am'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%r', $time); $expected = '%I:%M:%S AM'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%R', $time); $expected = '11:43'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%t', $time); $expected = "\t"; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%T', $time); $expected = '%H:%M:%S'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%u', $time); $expected = 4; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%x', $time); $expected = '%d/%m/%y'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%X', $time); $expected = '%H:%M:%S'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -750,11 +750,11 @@ class TimeHelperTest extends CakeTestCase { $time = strtotime('Thu Jan 14 11:43:39 2010'); $result = $this->Time->convertSpecifiers('%e', $time); $expected = '14'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->convertSpecifiers('%e', strtotime('2011-01-01')); $expected = ' 1'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** @@ -772,19 +772,19 @@ class TimeHelperTest extends CakeTestCase { $result = $this->Time->i18nFormat($time); $expected = '14/01/10'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->i18nFormat($time, '%c'); $expected = 'jue 14 ene 2010 13:59:28 ' . strftime('%Z', $time); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->i18nFormat($time, 'Time is %r, and date is %x'); $expected = 'Time is 01:59:28 PM, and date is 14/01/10'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Time->i18nFormat('invalid date', '%x', 'Date invalid'); $expected = 'Date invalid'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); } /** diff --git a/lib/Cake/Test/Case/View/HelperTest.php b/lib/Cake/Test/Case/View/HelperTest.php index 547c449c7..6bdc30678 100644 --- a/lib/Cake/Test/Case/View/HelperTest.php +++ b/lib/Cake/Test/Case/View/HelperTest.php @@ -648,7 +648,7 @@ class HelperTest extends CakeTestCase { } } $expected = array('what', 'how', 'how', 'what', 'how', 'how'); - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Helper->request->data['HelperTestComment']['5']['id'] = 'ok'; $result = $this->Helper->value('HelperTestComment.5.id'); @@ -754,7 +754,7 @@ class HelperTest extends CakeTestCase { $this->Helper->request->webroot = '/'; $result = $this->Helper->webroot('/img/cake.power.gif'); $expected = '/img/cake.power.gif'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $this->Helper->theme = 'test_theme'; @@ -764,30 +764,30 @@ class HelperTest extends CakeTestCase { $result = $this->Helper->webroot('/img/cake.power.gif'); $expected = '/theme/test_theme/img/cake.power.gif'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Helper->webroot('/img/test.jpg'); $expected = '/theme/test_theme/img/test.jpg'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $webRoot = Configure::read('App.www_root'); Configure::write('App.www_root', CAKE . 'Test' . DS . 'test_app' . DS . 'webroot' . DS); $result = $this->Helper->webroot('/img/cake.power.gif'); $expected = '/theme/test_theme/img/cake.power.gif'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Helper->webroot('/img/test.jpg'); $expected = '/theme/test_theme/img/test.jpg'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Helper->webroot('/img/cake.icon.gif'); $expected = '/img/cake.icon.gif'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); $result = $this->Helper->webroot('/img/cake.icon.gif?some=param'); $expected = '/img/cake.icon.gif?some=param'; - $this->assertEqual($result, $expected); + $this->assertEqual($expected, $result); Configure::write('App.www_root', $webRoot); }