diff options
-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'); |