mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/13612] Run meta refresh until extension is fully enabled
PHPBB3-13612
This commit is contained in:
parent
9e3bc9a3f9
commit
8314ce6871
1 changed files with 20 additions and 1 deletions
|
@ -410,7 +410,26 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||||
$form = $crawler->selectButton('Enable')->form();
|
$form = $crawler->selectButton('Enable')->form();
|
||||||
$crawler = self::submit($form);
|
$crawler = self::submit($form);
|
||||||
$this->add_lang('acp/extensions');
|
$this->add_lang('acp/extensions');
|
||||||
$this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', $crawler->filter('div.successbox')->text());
|
|
||||||
|
$meta_refresh = $crawler->filter('meta[http-equiv="refresh"]');
|
||||||
|
|
||||||
|
// Wait for extension to be fully enabled
|
||||||
|
while (sizeof($meta_refresh))
|
||||||
|
{
|
||||||
|
preg_match('#url=.+/(adm+.+)#', $meta_refresh->attr('content'), $match);
|
||||||
|
$url = $match[1];
|
||||||
|
$crawler = self::request('POST', $url);
|
||||||
|
$meta_refresh = $crawler->filter('meta[http-equiv="refresh"]');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($meta_refresh))
|
||||||
|
{
|
||||||
|
$this->assertContainsLang('EXTENSIONS_ADMIN', $crawler->filter('.main > h1')->text());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', $crawler->filter('div.successbox')->text());
|
||||||
|
}
|
||||||
|
|
||||||
$this->logout();
|
$this->logout();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue