Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix failing tests.
Refs GH-1307
  • Loading branch information
markstory committed May 29, 2013
1 parent aa9f221 commit 06cf62a
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions lib/Cake/Test/Case/BasicsTest.php
Expand Up @@ -703,8 +703,9 @@ public function testDebug() {
########## DEBUG ##########
'this-is-a-test'
###########################
EXPECTED;
$expected = sprintf($expectedText, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 8);
$expected = sprintf($expectedText, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 9);

$this->assertEquals($expected, $result);

Expand Down Expand Up @@ -766,9 +767,10 @@ public function testDebug() {
########## DEBUG ##########
'<div>this-is-a-test</div>'
###########################
EXPECTED;
if (php_sapi_name() === 'cli') {
$expected = sprintf($expectedText, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 17);
$expected = sprintf($expectedText, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 18);
} else {
$expected = sprintf($expectedHtml, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 19);
}
Expand All @@ -790,9 +792,10 @@ public function testDebug() {
########## DEBUG ##########
'<div>this-is-a-test</div>'
###########################
EXPECTED;
if (php_sapi_name() === 'cli') {
$expected = sprintf($expectedText, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 17);
$expected = sprintf($expectedText, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 18);
} else {
$expected = sprintf($expectedHtml, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 19);
}
Expand All @@ -806,8 +809,9 @@ public function testDebug() {
########## DEBUG ##########
'<div>this-is-a-test</div>'
###########################
EXPECTED;
$expected = sprintf($expected, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 8);
$expected = sprintf($expected, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 9);
$this->assertEquals($expected, $result);

ob_start();
Expand All @@ -818,8 +822,9 @@ public function testDebug() {
########## DEBUG ##########
'<div>this-is-a-test</div>'
###########################
EXPECTED;
$expected = sprintf($expected, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 8);
$expected = sprintf($expected, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 9);
$this->assertEquals($expected, $result);

ob_start();
Expand All @@ -830,8 +835,9 @@ public function testDebug() {
########## DEBUG ##########
'<div>this-is-a-test</div>'
###########################
EXPECTED;
$expected = sprintf($expected, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 8);
$expected = sprintf($expected, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 9);
$this->assertEquals($expected, $result);

ob_start();
Expand All @@ -842,8 +848,9 @@ public function testDebug() {
########## DEBUG ##########
false
###########################
EXPECTED;
$expected = sprintf($expected, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 8);
$expected = sprintf($expected, str_replace(CAKE_CORE_INCLUDE_PATH, '', __FILE__), __LINE__ - 9);
$this->assertEquals($expected, $result);
}

Expand Down

0 comments on commit 06cf62a

Please sign in to comment.