From dbf801b9d4ffc6b0f817a36b9766bc3a9630dd60 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 4 Sep 2011 01:06:00 +0100 Subject: [PATCH] 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 7603a1f9b98..ccbf484f658 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -89,9 +89,8 @@ public function testExcerpt() { $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));