public function testCreateDefault() { $loader = ErrorPageLoader::createDefault(); try { $contentDefault = $loader->loadContentByStatusCode(0); $this->assertTrue(is_resource($contentDefault), 'The content is not resource'); $this->assertContains('<h1>Oops! An Error Occurred</h1>', stream_get_contents($contentDefault)); } finally { fclose($contentDefault); } }
protected function createHandler() { return new DefaultExceptionHandler(new ZendPsr7Factory(), ErrorPageLoader::createDefault()); }
/** * @return ErrorPageLoaderInterface */ public function getErrorPageLoader() { if (null === $this->errorPageLoader) { $this->errorPageLoader = ErrorPageLoader::createDefault(); } return $this->errorPageLoader; }