Skip to content

Commit

Permalink
Make it possible to override how to get the log out link
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Jun 6, 2024
1 parent 22d69d8 commit 4e0b442
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function loggedIn()

// As a last resort, if a logout link is found, we are logged in. While not
// perfect, this is how Drupal SimpleTests currently work as well.
if ($page->findLink($this->getDrupalText('log_out'))) {
if ($this->getLogoutLinkElement()) {
return true;
}

Expand All @@ -158,6 +158,14 @@ public function loggedIn()
return false;
}

/**
* Helper to get the log out link from the page.
*/
public function getLogoutLinkElement()
{
return $this->getSession()->getPage()->findLink($this->getDrupalText('log_out'));
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 4e0b442

Please sign in to comment.