From dbf801b9d4ffc6b0f817a36b9766bc3a9630dd60 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 4 Sep 2011 01:06:00 +0100 Subject: [PATCH 1/3] Fixing failing test. --- lib/Cake/Test/Case/Utility/DebuggerTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index 7603a1f9b..ccbf484f6 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -89,9 +89,8 @@ class DebuggerTest extends CakeTestCase { $this->assertTrue(is_array($result)); $this->assertEqual(count($result), 4); - $expected = '<?php'; - $expected .= ''; - $this->assertEqual($result[0], $expected); + $pattern = '/.*?<\?php/'; + $this->assertRegExp($pattern, $result[0]); $return = Debugger::excerpt('[internal]', 2, 2); $this->assertTrue(empty($return)); From 8c8dc6cebbc549db99f768b537ff346d2578df02 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 4 Sep 2011 01:55:26 +0100 Subject: [PATCH 2/3] Fixing the one failing Multibyte test. --- lib/Cake/Config/unicode/casefolding/0500_052f.php | 2 ++ lib/Cake/Test/Case/I18n/MultibyteTest.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Config/unicode/casefolding/0500_052f.php b/lib/Cake/Config/unicode/casefolding/0500_052f.php index bda9ddafc..32b5e7cc1 100644 --- a/lib/Cake/Config/unicode/casefolding/0500_052f.php +++ b/lib/Cake/Config/unicode/casefolding/0500_052f.php @@ -46,3 +46,5 @@ $config['0500_052f'][] = array('upper' => 1288, 'status' => 'C', 'lower' => arra $config['0500_052f'][] = array('upper' => 1290, 'status' => 'C', 'lower' => array(1291)); /* CYRILLIC CAPITAL LETTER KOMI NJE */ $config['0500_052f'][] = array('upper' => 1292, 'status' => 'C', 'lower' => array(1293)); /* CYRILLIC CAPITAL LETTER KOMI SJE */ $config['0500_052f'][] = array('upper' => 1294, 'status' => 'C', 'lower' => array(1295)); /* CYRILLIC CAPITAL LETTER KOMI TJE */ +$config['0500_052f'][] = array('upper' => 1296, 'status' => 'C', 'lower' => array(1297)); /* CYRILLIC CAPITAL LETTER ZE */ +$config['0500_052f'][] = array('upper' => 1298, 'status' => 'C', 'lower' => array(1299)); /* CYRILLIC CAPITAL LETTER El with hook */ diff --git a/lib/Cake/Test/Case/I18n/MultibyteTest.php b/lib/Cake/Test/Case/I18n/MultibyteTest.php index 40caec103..a7ea8bd9a 100644 --- a/lib/Cake/Test/Case/I18n/MultibyteTest.php +++ b/lib/Cake/Test/Case/I18n/MultibyteTest.php @@ -4515,7 +4515,7 @@ class MultibyteTest extends CakeTestCase { $string = 'državni'; $find = 'dž'; $result = mb_strripos($string, $find); - $this->assertFalse($result); + $this->assertEquals(0, $result); } /** @@ -7124,7 +7124,7 @@ mb_strtolower does not work for these strings. $string = 'ԀԂԄԆԈԊԌԎԐԒ'; $result = Multibyte::strtolower($string); - $expected = 'ԁԃԅԇԉԋԍԏԐԒ'; + $expected = 'ԁԃԅԇԉԋԍԏԑԓ'; $this->assertEqual($expected, $result); $string = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև'; From 8630f4cdcb0af99827de5be7ee73213f2302ff83 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 4 Sep 2011 02:15:45 +0100 Subject: [PATCH 3/3] Fixing mistake in last commit. --- lib/Cake/Test/Case/I18n/MultibyteTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/I18n/MultibyteTest.php b/lib/Cake/Test/Case/I18n/MultibyteTest.php index a7ea8bd9a..f7268bf0b 100644 --- a/lib/Cake/Test/Case/I18n/MultibyteTest.php +++ b/lib/Cake/Test/Case/I18n/MultibyteTest.php @@ -4515,7 +4515,7 @@ class MultibyteTest extends CakeTestCase { $string = 'državni'; $find = 'dž'; $result = mb_strripos($string, $find); - $this->assertEquals(0, $result); + $this->assertFalse($result); } /**