/** * Add custom error handler */ protected function initializeContainer() { $handler = new ErrorHandler(); $handler->registerHandlers(); parent::initializeContainer(); }
/** * @param string $message * @param bool $silenced * @dataProvider warningDataProvider */ public function testHandleWarning($message, $silenced = true) { $this->assertEquals($silenced, $this->handler->handleWarning(E_WARNING, $message)); }
public function testHandleIgnoreWarnings() { $this->assertFalse($this->handler->handle(E_WARNING, 'Test warning', '', 0)); }