diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-02-17 13:26:35 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-02-17 13:26:35 +0100 |
commit | a75885bd85d57401904055366c18733ac84b323a (patch) | |
tree | 8de5a88471ae972d019691e3bba3c62a62287574 /tests | |
parent | 620a8622660c5a00f56ce686e397ed09d9cd4039 (diff) | |
download | forums-a75885bd85d57401904055366c18733ac84b323a.tar forums-a75885bd85d57401904055366c18733ac84b323a.tar.gz forums-a75885bd85d57401904055366c18733ac84b323a.tar.bz2 forums-a75885bd85d57401904055366c18733ac84b323a.tar.xz forums-a75885bd85d57401904055366c18733ac84b323a.zip |
[ticket/14315] Add logout to ui tests and use in permissions role test
PHPBB3-14315
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_framework/phpbb_ui_test_case.php | 10 | ||||
-rw-r--r-- | tests/ui/permission_roles_test.php | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php index f9f4c516e6..7e87b63b97 100644 --- a/tests/test_framework/phpbb_ui_test_case.php +++ b/tests/test_framework/phpbb_ui_test_case.php @@ -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. diff --git a/tests/ui/permission_roles_test.php b/tests/ui/permission_roles_test.php index fbd0750785..8d704606bf 100644 --- a/tests/ui/permission_roles_test.php +++ b/tests/ui/permission_roles_test.php @@ -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'); |