mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17151] Fix PHP warning on board settings page, add ACP pages test
PHPBB3-17151
This commit is contained in:
parent
1cbe1d86da
commit
130366edfa
2 changed files with 39 additions and 1 deletions
|
@ -1124,7 +1124,7 @@ class acp_board
|
|||
{
|
||||
global $db;
|
||||
|
||||
return phpbb_language_select($db, $default, $langdata);
|
||||
return ['options' => phpbb_language_select($db, $default, $langdata)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,4 +28,42 @@ class phpbb_functional_acp_main_test extends phpbb_functional_test_case
|
|||
$this->assertContainsLang('DATABASE_SIZE', $crawler->filter('tbody > tr')->eq(2)->filter('td[class="tabled"]')->eq(0)->text());
|
||||
$this->assertNotContainsLang('NOT_AVAILABLE', $crawler->filter('tbody > tr')->eq(2)->filter('td[class="tabled"]')->eq(1)->text());
|
||||
}
|
||||
|
||||
public function test_all_acp_module_links()
|
||||
{
|
||||
$this->add_lang('common');
|
||||
$this->login();
|
||||
$this->admin_login();
|
||||
|
||||
// Browse ACP main page
|
||||
$crawler = self::request('GET', 'index.php');
|
||||
$crawler = self::$client->click($crawler->selectLink($this->lang('ACP_SHORT'))->link());
|
||||
|
||||
// Get all ACP module URLs array
|
||||
$acp_modules = $crawler->filter('.tabs a')->each(
|
||||
function ($node, $i)
|
||||
{
|
||||
return $node->link();
|
||||
}
|
||||
);
|
||||
|
||||
// Browse all ACP modules and get their mode URLs array
|
||||
$acp_submodules = [];
|
||||
foreach ($acp_modules as $module)
|
||||
{
|
||||
$crawler = self::$client->click($module);
|
||||
$acp_submodules = array_merge($acp_submodules, $crawler->filter('.menu-block > ul a')->each(
|
||||
function ($node, $i)
|
||||
{
|
||||
return $node->link();
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
// Browse all ACP submodules' modes
|
||||
foreach ($acp_submodules as $acp_submodule)
|
||||
{
|
||||
self::$client->click($acp_submodule);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue