public function testdisplay() { $view = new ViewHtml(); //execute the method and test if it works and does not throws an exception. try { $view->display(); } catch (Exception $e) { $this->fail(); } }