diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php index cb27511be1..46f3dc6f96 100644 --- a/tests/functional/extension_controller_test.php +++ b/tests/functional/extension_controller_test.php @@ -85,10 +85,7 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c $phpbb_extension_manager = $this->get_ext_manager(); $phpbb_extension_manager->enable('foobar'); $crawler = $this->request('GET', 'index.php?ext=foobar'); - if($this->assertGreaterThan(0, $crawler->filter('#welcome')->count())) - { - $this->assertContains("This is for testing purposes.", $crawler->filter('#welcome')->text()); - } + $this->assertContains("This is for testing purposes.", $crawler->filter('#page-body')->text()); $phpbb_extension_manager->purge('foobar'); } @@ -101,11 +98,8 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c $phpbb_extension_manager = $this->get_ext_manager(); $phpbb_extension_manager->enable('foo/bar'); $crawler = $this->request('GET', 'index.php?ext=foo/bar'); - if($this->assertGreaterThan(0, $crawler->filter('#welcome')->count())) - { - $this->assertContains("This is for testing purposes.", $crawler->filter('#welcome')->text()); - } - $phpbb_extension_manager->purge('foo_bar'); + $this->assertContains("This is for testing purposes.", $crawler->filter('#page-body')->text()); + $phpbb_extension_manager->purge('foo/bar'); } /** @@ -118,7 +112,7 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c $phpbb_extension_manager->enable('error/class'); $crawler = $this->request('GET', 'index.php?ext=error/class'); $this->assertContains("The extension error/class is missing a controller class and cannot be accessed through the front-end.", $crawler->filter('#message')->text()); - $phpbb_extension_manager->purge('error_class'); + $phpbb_extension_manager->purge('error/class'); } /** @@ -131,7 +125,7 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c $phpbb_extension_manager->enable('error/classtype'); $crawler = $this->request('GET', 'index.php?ext=error/classtype'); $this->assertContains("The extension controller class phpbb_ext_error_classtype_controller is not an instance of the phpbb_extension_controller_interface.", $crawler->filter('#message')->text()); - $phpbb_extension_manager->purge('error_classtype'); + $phpbb_extension_manager->purge('error/classtype'); } /** diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 9797ecfef8..b3376891bc 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -89,7 +89,7 @@ class phpbb_functional_test_case extends phpbb_test_case { global $phpbb_root_path, $phpEx; - return new phpbb_extension_manager($this->get_db(), self::$config['table_prefix'] . 'ext', $phpbb_root_path, ".$phpEx", new phpbb_cache_driver_null); + return new phpbb_extension_manager($this->get_db(), self::$config['table_prefix'] . 'ext', $phpbb_root_path, ".$phpEx", new phpbb_cache_driver_file); } protected function install_board() diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php index 51b04db263..4aec07a8fb 100644 --- a/tests/test_framework/phpbb_test_case_helpers.php +++ b/tests/test_framework/phpbb_test_case_helpers.php @@ -81,7 +81,7 @@ class phpbb_test_case_helpers $config['phpbb_functional_url'] = $phpbb_functional_url; } - if (isset($phpbb_functional_path)) + if (!empty($phpbb_functional_path)) { $config['phpbb_functional_path'] = $phpbb_functional_path; } @@ -106,11 +106,9 @@ class phpbb_test_case_helpers )); } - if (isset($_SERVER['PHPBB_FUNCTIONAL_PATH'])) + if (!empty($_SERVER['PHPBB_FUNCTIONAL_PATH'])) { - $config = array_merge($config, array( - 'phpbb_functional_path' => isset($_SERVER['PHPBB_FUNCTIONAL_PATH']) ? $_SERVER['PHPBB_FUNCTIONAL_PATH'] : '', - )); + $config['phpbb_functional_path'] = $_SERVER['PHPBB_FUNCTIONAL_PATH']; } return $config;