Skip to content

Commit d3844de

Browse files
committed
Migrating DebuggerTest to phpunit
1 parent bd7ce38 commit d3844de

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cake/tests/cases/libs/debugger.test.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ function testOutput() {
119119
$this->assertEqual($result[0]['error'], 'Notice');
120120
$this->assertPattern('/Undefined variable\:\s+out/', $result[0]['description']);
121121
$this->assertPattern('/DebuggerTest::testOutput/i', $result[0]['trace']);
122-
$this->assertPattern('/SimpleInvoker::invoke/i', $result[0]['trace']);
123122

124123
ob_start();
125124
Debugger::output('txt');
@@ -129,7 +128,6 @@ function testOutput() {
129128
$this->assertPattern('/Undefined variable:\s+other/', $result);
130129
$this->assertPattern('/Context:/', $result);
131130
$this->assertPattern('/DebuggerTest::testOutput/i', $result);
132-
$this->assertPattern('/SimpleInvoker::invoke/i', $result);
133131

134132
ob_start();
135133
Debugger::output('html');
@@ -157,7 +155,6 @@ function testOutput() {
157155
$this->assertPattern('/Undefined variable:\s+buzz/', $result[1]);
158156
$this->assertPattern('/<a[^>]+>Code/', $result[1]);
159157
$this->assertPattern('/<a[^>]+>Context/', $result[2]);
160-
set_error_handler('simpleTestErrorHandler');
161158
}
162159

163160
/**
@@ -185,13 +182,12 @@ function testChangeOutputFormats() {
185182
ob_start();
186183
$foo .= '';
187184
$result = ob_get_clean();
188-
set_error_handler('SimpleTestErrorHandler');
189185

190186
$data = array(
191187
'error' => array(),
192188
'code' => array(), '8', '/code',
193189
'file' => array(), 'preg:/[^<]+/', '/file',
194-
'line' => array(), '' . (intval(__LINE__) + -8), '/line',
190+
'line' => array(), '' . (intval(__LINE__) - 7), '/line',
195191
'preg:/Undefined variable:\s+foo/',
196192
'/error'
197193
);

0 commit comments

Comments
 (0)