diff options
Diffstat (limited to 'tests/extension')
-rw-r--r-- | tests/extension/finder_test.php | 17 | ||||
-rw-r--r-- | tests/extension/manager_test.php | 6 | ||||
-rw-r--r-- | tests/extension/metadata_manager_test.php | 6 |
3 files changed, 25 insertions, 4 deletions
diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php index dc3e26be02..6f3cebbd7c 100644 --- a/tests/extension/finder_test.php +++ b/tests/extension/finder_test.php @@ -158,6 +158,23 @@ class phpbb_extension_finder_test extends phpbb_test_case ); } + public function test_find_from_extension() + { + $files = $this->finder + ->extension_directory('/type') + ->find_from_extension('foo', dirname(__FILE__) . '/ext/foo/'); + $classes = $this->finder->get_classes_from_files($files); + + sort($classes); + $this->assertEquals( + array( + 'phpbb_ext_foo_type_alternative', + 'phpbb_ext_foo_type_dummy_empty', + ), + $classes + ); + } + /** * These do not work because of changes with PHPBB3-11386 * They do not seem neccessary to me, so I am commenting them out for now diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php index c5b8237b82..a23e5a18d9 100644 --- a/tests/extension/manager_test.php +++ b/tests/extension/manager_test.php @@ -107,11 +107,13 @@ class phpbb_extension_manager_test extends phpbb_database_test_case $table_prefix, array() ); + $container = new phpbb_mock_container_builder(); + $container->set('migrator', $migrator); + return new phpbb_extension_manager( - new phpbb_mock_container_builder(), + $container, $db, $config, - $migrator, new phpbb_filesystem(), 'phpbb_ext', dirname(__FILE__) . '/', diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php index 2f38a26217..d410333f09 100644 --- a/tests/extension/metadata_manager_test.php +++ b/tests/extension/metadata_manager_test.php @@ -61,11 +61,13 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $this->table_prefix, array() ); + $container = new phpbb_mock_container_builder(); + $container->set('migrator', $migrator); + $this->extension_manager = new phpbb_extension_manager( - new phpbb_mock_container_builder(), + $container, $this->db, $this->config, - $this->migrator, new phpbb_filesystem(), 'phpbb_ext', $this->phpbb_root_path, |