phpbb_extension_manager = $this->get_extension_manager(); $this->purge_cache(); } /** * Check a controller for extension foo/bar */ public function test_foo_bar() { $this->phpbb_extension_manager->enable('foo/bar'); $crawler = $this->request('GET', 'app.php/foo/bar'); $this->assertContains("foo/bar controller handle() method", $crawler->filter('body')->text()); $this->phpbb_extension_manager->purge('foobar'); } /** * Check the error produced by extension at ./ext/does/not/exist * * If an extension is disabled, its routes are not loaded. Because we * are not looking for a controller based on a specified extension, * we don't know the difference between a route in a disabled * extension and a route that is not defined anyway; it is the same * error message. */ public function test_error_ext_disabled_or_404() { $crawler = $this->request('GET', 'app.php/does/not/exist'); $this->assertContains('No route found for "GET /does/not/exist"', $crawler->filter('body')->text()); } }