aboutsummaryrefslogtreecommitdiffstats
path: root/tests/controller/controller_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/controller/controller_test.php')
-rw-r--r--tests/controller/controller_test.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 588adbcfb1..550679ff07 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -21,20 +21,18 @@ class phpbb_controller_controller_test extends phpbb_test_case
$this->extension_manager = new phpbb_mock_extension_manager(
dirname(__FILE__) . '/',
array(
- 'foo' => array(
- 'ext_name' => 'foo',
+ 'vendor2/foo' => array(
+ 'ext_name' => 'vendor2/foo',
'ext_active' => '1',
- 'ext_path' => 'ext/foo/',
+ 'ext_path' => 'ext/vendor2/foo/',
),
));
}
public function test_provider()
{
- $provider = new \phpbb\controller\provider;
- $routes = $provider
- ->import_paths_from_finder($this->extension_manager->get_finder())
- ->find(__DIR__);
+ $provider = new \phpbb\controller\provider($this->extension_manager->get_finder());
+ $routes = $provider->find(__DIR__)->get_routes();
// This will need to be updated if any new routes are defined
$this->assertInstanceOf('Symfony\Component\Routing\Route', $routes->get('core_controller'));
@@ -52,7 +50,7 @@ class phpbb_controller_controller_test extends phpbb_test_case
$container = new ContainerBuilder();
// YamlFileLoader only uses one path at a time, so we need to loop
// through all of the ones we are using.
- foreach (array(__DIR__.'/config', __DIR__.'/ext/foo/config') as $path)
+ foreach (array(__DIR__.'/config', __DIR__ . '/ext/vendor2/foo/config') as $path)
{
$loader = new YamlFileLoader($container, new FileLocator($path));
$loader->load('services.yml');
@@ -60,9 +58,9 @@ class phpbb_controller_controller_test extends phpbb_test_case
// Autoloading classes within the tests folder does not work
// so I'll include them manually.
- if (!class_exists('foo\\controller'))
+ if (!class_exists('vendor2\\foo\\controller'))
{
- include(__DIR__.'/ext/foo/controller.php');
+ include(__DIR__ . '/ext/vendor2/foo/controller.php');
}
if (!class_exists('phpbb\\controller\\foo'))
{