Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to override how to get the log out link #668

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading