diff options
author | Maat <maat-pub@mageia.biz> | 2020-05-08 21:52:11 +0200 |
---|---|---|
committer | Maat <maat-pub@mageia.biz> | 2020-05-08 21:52:11 +0200 |
commit | 8ea437e30605e0f66b5220bf904a61d7c1d11ddd (patch) | |
tree | e0db2bb4a012d5b06a633160b19f62f4868ecd28 /tests/extension | |
parent | 36bc1870f21fac04736a1049c1d5b8e127d729f4 (diff) | |
parent | 2fdd46b36431ae0f58bb2e78e42553168db9a0ff (diff) | |
download | forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.gz forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.bz2 forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.xz forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.zip |
Merge remote-tracking branch 'upstream/prep-release-3.2.9'
Diffstat (limited to 'tests/extension')
-rw-r--r-- | tests/extension/ext/vendor2/bar/acp/a_info.php | 1 | ||||
-rw-r--r-- | tests/extension/ext/vendor2/bar/migrations/bar.php | 7 | ||||
-rw-r--r-- | tests/extension/ext/vendor2/bar/migrations/foo.php | 54 | ||||
-rw-r--r-- | tests/extension/ext/vendor2/foo/acp/a_info.php | 1 | ||||
-rw-r--r-- | tests/extension/ext/vendor2/foo/acp/fail_info.php | 1 | ||||
-rw-r--r-- | tests/extension/ext/vendor2/foo/mcp/a_info.php | 1 | ||||
-rw-r--r-- | tests/extension/extension_base_test.php | 12 | ||||
-rw-r--r-- | tests/extension/finder_test.php | 5 | ||||
-rw-r--r-- | tests/extension/includes/acp/info/acp_foobar.php | 1 | ||||
-rw-r--r-- | tests/extension/manager_test.php | 9 | ||||
-rw-r--r-- | tests/extension/metadata_manager_test.php | 92 | ||||
-rw-r--r-- | tests/extension/modules_test.php | 61 |
12 files changed, 152 insertions, 93 deletions
diff --git a/tests/extension/ext/vendor2/bar/acp/a_info.php b/tests/extension/ext/vendor2/bar/acp/a_info.php index 8132df587f..8268006f9f 100644 --- a/tests/extension/ext/vendor2/bar/acp/a_info.php +++ b/tests/extension/ext/vendor2/bar/acp/a_info.php @@ -9,7 +9,6 @@ class a_info return array( 'filename' => 'vendor2\\bar\\acp\\a_module', 'title' => 'Bar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')), ), diff --git a/tests/extension/ext/vendor2/bar/migrations/bar.php b/tests/extension/ext/vendor2/bar/migrations/bar.php new file mode 100644 index 0000000000..ea5ddb6b8b --- /dev/null +++ b/tests/extension/ext/vendor2/bar/migrations/bar.php @@ -0,0 +1,7 @@ +<?php + +namespace vendor2\foo\migrations; + +class bar +{ +} diff --git a/tests/extension/ext/vendor2/bar/migrations/foo.php b/tests/extension/ext/vendor2/bar/migrations/foo.php new file mode 100644 index 0000000000..d727c2f954 --- /dev/null +++ b/tests/extension/ext/vendor2/bar/migrations/foo.php @@ -0,0 +1,54 @@ +<?php + +namespace vendor2\foo\migrations; + +class foo implements \phpbb\db\migration\migration_interface +{ + /** + * {@inheritdoc} + */ + static public function depends_on() + { + return array(); + } + + /** + * {@inheritdoc} + */ + public function effectively_installed() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function update_schema() + { + return array(); + } + + /** + * {@inheritdoc} + */ + public function revert_schema() + { + return array(); + } + + /** + * {@inheritdoc} + */ + public function update_data() + { + return array(); + } + + /** + * {@inheritdoc} + */ + public function revert_data() + { + return array(); + } +} diff --git a/tests/extension/ext/vendor2/foo/acp/a_info.php b/tests/extension/ext/vendor2/foo/acp/a_info.php index e1eaa340b7..48ab4cf8e7 100644 --- a/tests/extension/ext/vendor2/foo/acp/a_info.php +++ b/tests/extension/ext/vendor2/foo/acp/a_info.php @@ -9,7 +9,6 @@ class a_info return array( 'filename' => 'vendor2\\foo\\acp\\a_module', 'title' => 'Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')), ), diff --git a/tests/extension/ext/vendor2/foo/acp/fail_info.php b/tests/extension/ext/vendor2/foo/acp/fail_info.php index d9b4353957..78479fee70 100644 --- a/tests/extension/ext/vendor2/foo/acp/fail_info.php +++ b/tests/extension/ext/vendor2/foo/acp/fail_info.php @@ -13,7 +13,6 @@ class foo_info return array( 'filename' => 'vendor2\foo\acp\fail_module', 'title' => 'Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')), ), diff --git a/tests/extension/ext/vendor2/foo/mcp/a_info.php b/tests/extension/ext/vendor2/foo/mcp/a_info.php index b5599fde65..2532e44b12 100644 --- a/tests/extension/ext/vendor2/foo/mcp/a_info.php +++ b/tests/extension/ext/vendor2/foo/mcp/a_info.php @@ -9,7 +9,6 @@ class a_info return array( 'filename' => 'vendor2\\foo\\mcp\\a_module', 'title' => 'Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')), ), diff --git a/tests/extension/extension_base_test.php b/tests/extension/extension_base_test.php index eee38186db..e0c2e6d549 100644 --- a/tests/extension/extension_base_test.php +++ b/tests/extension/extension_base_test.php @@ -10,7 +10,9 @@ * the docs/CREDITS.txt file. * */ -require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/ext/vendor2/bar/migrations/bar.php'; +require_once dirname(__FILE__) . '/ext/vendor2/bar/migrations/foo.php'; +require_once dirname(__FILE__) . '/ext/vendor2/bar/migrations/migration.php'; class phpbb_extension_extension_base_test extends phpbb_test_case { @@ -61,9 +63,7 @@ class phpbb_extension_extension_base_test extends phpbb_test_case return array( array( 'vendor2/bar', - array( - '\vendor2\bar\migrations\migration', - ), + array('\vendor2\bar\migrations\migration'), ), ); } @@ -74,6 +74,8 @@ class phpbb_extension_extension_base_test extends phpbb_test_case public function test_suffix_get_classes($extension_name, $expected) { $extension = $this->extension_manager->get_extension($extension_name); - $this->assertEquals($expected, self::$reflection_method_get_migration_file_list->invoke($extension)); + $migration_classes = self::$reflection_method_get_migration_file_list->invoke($extension); + sort($migration_classes); + $this->assertEquals($expected, $migration_classes); } } diff --git a/tests/extension/finder_test.php b/tests/extension/finder_test.php index 2116cc057b..71de2c2fc5 100644 --- a/tests/extension/finder_test.php +++ b/tests/extension/finder_test.php @@ -10,7 +10,6 @@ * the docs/CREDITS.txt file. * */ -require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_extension_finder_test extends phpbb_test_case { @@ -244,7 +243,7 @@ class phpbb_extension_finder_test extends phpbb_test_case public function test_get_classes_create_cache() { $cache = new phpbb_mock_cache; - $finder = new \phpbb\finder(new \phpbb\filesystem(), dirname(__FILE__) . '/', $cache, 'php', '_custom_cache_name'); + $finder = new \phpbb\finder(new \phpbb\filesystem\filesystem(), dirname(__FILE__) . '/', $cache, 'php', '_custom_cache_name'); $finder->set_extensions(array_keys($this->extension_manager->all_enabled())); $files = $finder->suffix('_class.php')->get_files(); @@ -284,7 +283,7 @@ class phpbb_extension_finder_test extends phpbb_test_case ); $finder = new \phpbb\finder( - new \phpbb\filesystem(), + new \phpbb\filesystem\filesystem(), dirname(__FILE__) . '/', new phpbb_mock_cache(array( '_ext_finder' => array( diff --git a/tests/extension/includes/acp/info/acp_foobar.php b/tests/extension/includes/acp/info/acp_foobar.php index 870225ba4f..8ca1afa1c6 100644 --- a/tests/extension/includes/acp/info/acp_foobar.php +++ b/tests/extension/includes/acp/info/acp_foobar.php @@ -18,7 +18,6 @@ class acp_foobar_info return array( 'filename' => 'acp_foobar', 'title' => 'ACP Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'test' => array('title' => 'Test', 'auth' => '', 'cat' => array('ACP_GENERAL')), ), diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php index 0eeb060936..f619d4c19d 100644 --- a/tests/extension/manager_test.php +++ b/tests/extension/manager_test.php @@ -150,11 +150,11 @@ class phpbb_extension_manager_test extends phpbb_database_test_case $config = new \phpbb\config\config(array('version' => PHPBB_VERSION)); $db = $this->new_dbal(); - $db_tools = new \phpbb\db\tools($db); + $factory = new \phpbb\db\tools\factory(); + $db_tools = $factory->get($db); $phpbb_root_path = __DIR__ . './../../phpBB/'; $php_ext = 'php'; $table_prefix = 'phpbb_'; - $user = new \phpbb\user('\phpbb\user'); $container = new phpbb_mock_container_builder(); @@ -176,12 +176,11 @@ class phpbb_extension_manager_test extends phpbb_database_test_case $container, $db, $config, - new \phpbb\filesystem(), - $user, + new \phpbb\filesystem\filesystem(), 'phpbb_ext', dirname(__FILE__) . '/', $php_ext, - ($with_cache) ? new phpbb_mock_cache() : null + ($with_cache) ? new \phpbb\cache\service(new phpbb_mock_cache(), $config, $db, $phpbb_root_path, $php_ext) : null ); } } diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php index 2a746d3792..533da68c57 100644 --- a/tests/extension/metadata_manager_test.php +++ b/tests/extension/metadata_manager_test.php @@ -36,34 +36,49 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case { parent::setUp(); - $this->cache = new phpbb_mock_cache(); $this->config = new \phpbb\config\config(array( 'version' => '3.1.0', )); $this->db = $this->new_dbal(); - $this->db_tools = new \phpbb\db\tools($this->db); + $factory = new \phpbb\db\tools\factory(); + $this->db_tools = $factory->get($this->db); $this->phpbb_root_path = dirname(__FILE__) . '/'; $this->phpEx = 'php'; - $this->user = new \phpbb\user('\phpbb\datetime'); + + $this->cache = new \phpbb\cache\service(new phpbb_mock_cache(), $this->config, $this->db, $this->phpbb_root_path, $this->phpEx); + $this->table_prefix = 'phpbb_'; - $this->template = new \phpbb\template\twig\twig( - new \phpbb\path_helper( - new \phpbb\symfony_request( - new phpbb_mock_request() - ), - new \phpbb\filesystem(), - $this->getMock('\phpbb\request\request'), - $this->phpbb_root_path, - $this->phpEx + $container = new phpbb_mock_container_builder(); + $cache_path = $this->phpbb_root_path . 'cache/twig'; + $context = new \phpbb\template\context(); + $loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), ''); + $filesystem = new \phpbb\filesystem\filesystem(); + $phpbb_path_helper = new \phpbb\path_helper( + new \phpbb\symfony_request( + new phpbb_mock_request() ), + $filesystem, + $this->getMock('\phpbb\request\request'), + $this->phpbb_root_path, + $this->phpEx + ); + $twig = new \phpbb\template\twig\environment( $this->config, - $this->user, - new \phpbb\template\context() + $filesystem, + $phpbb_path_helper, + $cache_path, + null, + $loader, + new \phpbb\event\dispatcher($container), + array( + 'cache' => false, + 'debug' => false, + 'auto_reload' => true, + 'autoescape' => false, + ) ); - $container = new phpbb_mock_container_builder(); - $this->migrator = new \phpbb\db\migrator( $container, $this->config, @@ -82,13 +97,22 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $container, $this->db, $this->config, - new \phpbb\filesystem(), - $this->user, + new \phpbb\filesystem\filesystem(), 'phpbb_ext', $this->phpbb_root_path, $this->phpEx, $this->cache ); + + global $phpbb_root_path; + + $lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $this->phpEx); + $lang_loader->set_extension_manager($this->extension_manager); + $lang = new \phpbb\language\language($lang_loader); + $this->user = new \phpbb\user($lang, '\phpbb\datetime'); + + $this->template = new phpbb\template\twig\twig($phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $this->user))); + $twig->setLexer(new \phpbb\template\twig\lexer($twig)); } // Should fail from missing composer.json @@ -104,7 +128,8 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch (\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, $this->user->lang('FILE_NOT_FOUND', $this->phpbb_root_path . $this->extension_manager->get_extension_path($ext_name) . 'composer.json')); + $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters())); + $this->assertEquals($message, $this->user->lang('FILE_NOT_FOUND', $this->phpbb_root_path . $this->extension_manager->get_extension_path($ext_name) . 'composer.json')); } } @@ -121,7 +146,8 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch (\phpbb\extension\exception $e) { - $this->fail($e); + $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters())); + $this->fail($message); } $json = json_decode(file_get_contents($this->phpbb_root_path . 'ext/vendor2/foo/composer.json'), true); @@ -151,9 +177,10 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $manager->validate($field_name); $this->fail('Exception not triggered'); } - catch(\phpbb\extension\exception $e) + catch (\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', $field_name)); + $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters())); + $this->assertEquals($message, $this->user->lang('META_FIELD_NOT_SET', $field_name)); } } @@ -167,7 +194,8 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch (\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'authors')); + $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters())); + $this->assertEquals($message, $this->user->lang('META_FIELD_NOT_SET', 'authors')); } $manager->merge_metadata(array( @@ -183,7 +211,8 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch (\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'author name')); + $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters())); + $this->assertEquals($message, $this->user->lang('META_FIELD_NOT_SET', 'author name')); } } @@ -214,9 +243,10 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case $manager->validate($field_name); $this->fail('Exception not triggered'); } - catch(\phpbb\extension\exception $e) + catch (\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', $field_name)); + $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters())); + $this->assertEquals($message, $this->user->lang('META_FIELD_INVALID', $field_name)); } } @@ -238,9 +268,9 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case { $this->assertEquals(true, $manager->validate('enable')); } - catch(\phpbb\extension\exception $e) + catch (\phpbb\extension\exception $e) { - $this->fail($e); + $message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters())); } } @@ -333,11 +363,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case { return new phpbb_mock_metadata_manager( $ext_name, - $this->config, - $this->extension_manager, - $this->template, - $this->user, - $this->phpbb_root_path + $this->extension_manager->get_extension_path($ext_name, true) ); } } diff --git a/tests/extension/modules_test.php b/tests/extension/modules_test.php index 21f1c6aca5..88634bc6ba 100644 --- a/tests/extension/modules_test.php +++ b/tests/extension/modules_test.php @@ -22,6 +22,7 @@ class phpbb_extension_modules_test extends phpbb_test_case { protected $extension_manager; protected $finder; + protected $module_manager; public function setUp() { @@ -43,7 +44,14 @@ class phpbb_extension_modules_test extends phpbb_test_case )); $phpbb_extension_manager = $this->extension_manager; - $this->acp_modules = new acp_modules(); + $this->module_manager = new \phpbb\module\module_manager( + new \phpbb\cache\driver\dummy(), + $this->getMock('\phpbb\db\driver\driver_interface'), + $this->extension_manager, + MODULES_TABLE, + dirname(__FILE__) . '/', + 'php' + ); } public function test_get_module_infos() @@ -56,13 +64,11 @@ class phpbb_extension_modules_test extends phpbb_test_case $phpbb_root_path = dirname(__FILE__) . '/'; // Find acp module info files - $this->acp_modules->module_class = 'acp'; - $acp_modules = $this->acp_modules->get_module_infos(); + $acp_modules = $this->module_manager->get_module_infos('acp'); $this->assertEquals(array( 'vendor2\\foo\\acp\\a_module' => array( 'filename' => 'vendor2\\foo\\acp\\a_module', 'title' => 'Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')), ), @@ -70,7 +76,6 @@ class phpbb_extension_modules_test extends phpbb_test_case 'acp_foobar' => array( 'filename' => 'acp_foobar', 'title' => 'ACP Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'test' => array('title' => 'Test', 'auth' => '', 'cat' => array('ACP_GENERAL')), ), @@ -78,13 +83,11 @@ class phpbb_extension_modules_test extends phpbb_test_case ), $acp_modules); // Find mcp module info files - $this->acp_modules->module_class = 'mcp'; - $acp_modules = $this->acp_modules->get_module_infos(); + $acp_modules = $this->module_manager->get_module_infos('mcp'); $this->assertEquals(array( 'vendor2\\foo\\mcp\\a_module' => array( 'filename' => 'vendor2\\foo\\mcp\\a_module', 'title' => 'Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')), ), @@ -92,27 +95,11 @@ class phpbb_extension_modules_test extends phpbb_test_case ), $acp_modules); // Find a specific module info file (mcp_a_module) - $this->acp_modules->module_class = 'mcp'; - $acp_modules = $this->acp_modules->get_module_infos('mcp_a_module'); - $this->assertEquals(array( - 'vendor2\\foo\\mcp\\a_module' => array( - 'filename' => 'vendor2\\foo\\mcp\\a_module', - 'title' => 'Foobar', - 'version' => '3.1.0-dev', - 'modes' => array( - 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')), - ), - ), - ), $acp_modules); - - // Find a specific module info file (mcp_a_module) with passing the module_class - $this->acp_modules->module_class = ''; - $acp_modules = $this->acp_modules->get_module_infos('mcp_a_module', 'mcp'); + $acp_modules = $this->module_manager->get_module_infos('mcp', 'mcp_a_module'); $this->assertEquals(array( 'vendor2\\foo\\mcp\\a_module' => array( 'filename' => 'vendor2\\foo\\mcp\\a_module', 'title' => 'Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')), ), @@ -120,23 +107,19 @@ class phpbb_extension_modules_test extends phpbb_test_case ), $acp_modules); // The mcp module info file we're looking for shouldn't exist - $this->acp_modules->module_class = 'mcp'; - $acp_modules = $this->acp_modules->get_module_infos('mcp_a_fail'); + $acp_modules = $this->module_manager->get_module_infos('mcp', 'mcp_a_fail'); $this->assertEquals(array(), $acp_modules); // As there are no ucp modules we shouldn't find any - $this->acp_modules->module_class = 'ucp'; - $acp_modules = $this->acp_modules->get_module_infos(); + $acp_modules = $this->module_manager->get_module_infos('ucp'); $this->assertEquals(array(), $acp_modules); // Get module info of specified extension module - $this->acp_modules->module_class = 'acp'; - $acp_modules = $this->acp_modules->get_module_infos('foo_acp_a_module'); + $acp_modules = $this->module_manager->get_module_infos('acp', 'foo_acp_a_module'); $this->assertEquals(array( 'vendor2\\foo\\acp\\a_module' => array ( 'filename' => 'vendor2\\foo\\acp\\a_module', 'title' => 'Foobar', - 'version' => '3.1.0-dev', 'modes' => array ( 'config' => array ('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array ('ACP_MODS')), ), @@ -144,23 +127,20 @@ class phpbb_extension_modules_test extends phpbb_test_case ), $acp_modules); // No specific module and module class set to an incorrect name - $acp_modules = $this->acp_modules->get_module_infos('', 'wcp', true); + $acp_modules = $this->module_manager->get_module_infos('wcp', '', true); $this->assertEquals(array(), $acp_modules); // No specific module, no module_class set in the function parameter, and an incorrect module class - $this->acp_modules->module_class = 'wcp'; - $acp_modules = $this->acp_modules->get_module_infos(); + $acp_modules = $this->module_manager->get_module_infos('wcp'); $this->assertEquals(array(), $acp_modules); // No specific module, module class set to false (will default to the above acp) // Setting $use_all_available will cause get_module_infos() to also load not enabled extensions (vendor2/bar) - $this->acp_modules->module_class = 'acp'; - $acp_modules = $this->acp_modules->get_module_infos('', false, true); + $acp_modules = $this->module_manager->get_module_infos('acp', '', true); $this->assertEquals(array( 'vendor2\\foo\\acp\\a_module' => array( 'filename' => 'vendor2\\foo\\acp\\a_module', 'title' => 'Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')), ), @@ -168,7 +148,6 @@ class phpbb_extension_modules_test extends phpbb_test_case 'acp_foobar' => array( 'filename' => 'acp_foobar', 'title' => 'ACP Foobar', - 'version' => '3.1.0-dev', 'modes' => array( 'test' => array('title' => 'Test', 'auth' => '', 'cat' => array('ACP_GENERAL')), ), @@ -176,7 +155,6 @@ class phpbb_extension_modules_test extends phpbb_test_case 'vendor2\\bar\\acp\\a_module' => array( 'filename' => 'vendor2\\bar\\acp\\a_module', 'title' => 'Bar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')), ), @@ -184,12 +162,11 @@ class phpbb_extension_modules_test extends phpbb_test_case ), $acp_modules); // Specific module set to disabled extension - $acp_modules = $this->acp_modules->get_module_infos('vendor2_bar_acp_a_module', 'acp', true); + $acp_modules = $this->module_manager->get_module_infos('acp', 'vendor2_bar_acp_a_module', true); $this->assertEquals(array( 'vendor2\\bar\\acp\\a_module' => array( 'filename' => 'vendor2\\bar\\acp\\a_module', 'title' => 'Bar', - 'version' => '3.1.0-dev', 'modes' => array( 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')), ), |