Browse Source

ErrorHandlerTest modified for $_SESSION var passes

master
Anton Grebnev 13 years ago
parent
commit
4c7f67f1b4
  1. 4
      tests/exception/ErrorHandlerTest.php

4
tests/exception/ErrorHandlerTest.php

@ -42,11 +42,15 @@ class ErrorHandlerTest extends PHPUnit_Framework_TestCase
trigger_error("test error", E_USER_ERROR); trigger_error("test error", E_USER_ERROR);
} }
/**
* @TODO: ErrorHandler->wrapTrace() not used
*/
public function testShowDebug() public function testShowDebug()
{ {
try { try {
throw new ErrorException("test error", E_USER_ERROR); throw new ErrorException("test error", E_USER_ERROR);
} catch (ErrorException $e) { } catch (ErrorException $e) {
$_SESSION['some'] = 'value';
$result = ErrorHandler::showDebug($e); $result = ErrorHandler::showDebug($e);
$this->assertNotEmpty($result); $this->assertNotEmpty($result);
$this->assertStringStartsWith('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', $result); $this->assertStringStartsWith('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', $result);

Loading…
Cancel
Save