mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-04 14:47:52 +02:00
[ticket/11465] Add comments explaining the tests
PHPBB3-11465
This commit is contained in:
parent
7240759e34
commit
6a1fa3e0f4
@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Due to the mismatch between the class name and the file name, this module
|
||||
* file shouldn't be found by the extension finder
|
||||
*/
|
||||
class phpbb_ext_foo_acp_foo_info
|
||||
{
|
||||
public function module()
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Due to the mismatch between the class name and the file name of the module
|
||||
* info file, this module's info file shouldn't be found
|
||||
*/
|
||||
class phpbb_ext_foo_acp_fail_module
|
||||
{
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ class phpbb_extension_modules_test extends phpbb_test_case
|
||||
// Correctly set the root path for this test to this directory, so the classes can be found
|
||||
$phpbb_root_path = dirname(__FILE__) . '/';
|
||||
|
||||
// Find acp module info files
|
||||
$this->acp_modules->module_class = 'acp';
|
||||
$acp_modules = $this->acp_modules->get_module_infos();
|
||||
$this->assertEquals(array(
|
||||
@ -68,6 +69,7 @@ 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();
|
||||
$this->assertEquals(array(
|
||||
@ -81,6 +83,7 @@ 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(
|
||||
@ -94,10 +97,12 @@ 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');
|
||||
$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();
|
||||
$this->assertEquals(array(), $acp_modules);
|
||||
|
Loading…
x
Reference in New Issue
Block a user