[ticket/14315] Add logout to ui tests and use in permissions role test

PHPBB3-14315
This commit is contained in:
Marc Alexander 2016-02-17 13:26:35 +01:00
parent 620a862266
commit a75885bd85
2 changed files with 11 additions and 0 deletions

View file

@ -276,6 +276,16 @@ class phpbb_ui_test_case extends phpbb_test_case
return self::$db;
}
protected function logout()
{
$this->add_lang('ucp');
$this->visit('ucp.php?sid=' . $this->sid . '&mode=logout');
$this->assertContains($this->lang('REGISTER'), self::$webDriver->getPageSource());
unset($this->sid);
}
/**
* Login to the ACP
* You must run login() before calling this.

View file

@ -19,6 +19,7 @@ class ui_permission_roles_test extends phpbb_ui_test_case
public function test_permission_roles()
{
$this->logout();
$this->login();
$this->admin_login();
$this->add_lang('acp/permissions');