some modifications for test isolation in DEBUG environment
This commit is contained in:
@ -56,7 +56,23 @@ class ErrorHandlerTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertStringStartsWith('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', $result);
|
||||
$this->assertStringEndsWith('</html>', $result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @TODO: ErrorHandler::wrapTrace not used
|
||||
* @TODO: nl2br() adds html <br /> but leaves original linebreak line \n
|
||||
*/
|
||||
public function testWrapTrace()
|
||||
{
|
||||
$class = new ReflectionClass('ErrorHandler');
|
||||
$method = $class->getMethod('WrapTrace');
|
||||
$method->setAccessible(true);
|
||||
$result = $method->invoke(null, "first line\nsecond line");
|
||||
$this->assertEquals("<code>first line<br />\nsecond line</code>", $result);
|
||||
$result = $method->invoke(null, "first line\r\nsecond line");
|
||||
$this->assertEquals("<code>first line<br />\r\nsecond line</code>", $result);
|
||||
$result = $method->invoke(null, "first line\r\n\r\nsecond line");
|
||||
$this->assertEquals("<code>first line<br />\r\n<br />\r\nsecond line</code>", $result);
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
|
Reference in New Issue
Block a user