/** * testError method * * @access public * @return void */ function testError() { ob_start(); $TestErrorHandler = new TestErrorHandler('error404', array('message' => 'Page not found')); ob_clean(); ob_start(); $TestErrorHandler->error(array('code' => 404, 'message' => 'Page not Found', 'name' => "Couldn't find what you were looking for")); $result = ob_get_clean(); $this->assertPattern("/<h2>Couldn't find what you were looking for<\\/h2>/", $result); $this->assertPattern('/Page not Found/', $result); }