| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 4 | class ErrorHandlerBuilderIntegrationTest extends \PHPUnit_Framework_TestCase |
||
| 5 | { |
||
| 6 | public function setUp() |
||
| 7 | { |
||
| 8 | $this->defaultErrorHandler = set_error_handler(function(){}); |
||
| 9 | $this->defaultExceptionHandler = set_exception_handler(function(){}); |
||
| 10 | $this->tearDown(); |
||
| 11 | |||
| 12 | $this->builder = new ErrorHandlerBuilder(); |
||
| 13 | } |
||
| 14 | |||
| 15 | public function tearDown() |
||
| 16 | { |
||
| 17 | set_error_handler($this->defaultErrorHandler); |
||
| 18 | set_exception_handler($this->defaultExceptionHandler); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function testBuild() |
||
| 22 | { |
||
| 23 | $handler = $this->builder->build(); |
||
| 24 | |||
| 25 | $this->assertSame(set_error_handler(function(){}), $this->defaultErrorHandler); |
||
| 26 | $this->assertSame(set_exception_handler(function(){}), $this->defaultExceptionHandler); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function testBuildAndRegister() |
||
| 35 | } |
||
| 36 | } |
||
| 37 |