Commit 4ec43a3f authored by Liam Morland's avatar Liam Morland
Browse files

ISTWCMS-4630: Logout before doing anonymous user test

When some tests are disabled, it may already be that no user is
logged-in. This is needed to make tests work when all tests are enabled.
parent 8491b79f
......@@ -1417,6 +1417,9 @@ class UwWcmsBasicTest extends BrowserTestBase {
*/
private function dashboardTest() {
// Anonymous user cannot view "Who's online" block in dashboard.
if ($this->loggedInUser) {
$this->drupalLogout();
}
$this->drupalGet('dashboard/my_dashboard');
$this->assertSession()->statusCodeEquals(403);
// "Who's online" block can be viewed by all roles.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment