Loading core/modules/user/src/Form/UserLogoutConfirm.php +8 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,14 @@ public function getConfirmText(): TranslatableMarkup { return $this->t('Log out'); } /** * {@inheritdoc} */ public function getDescription() { // phpcs:ignore Drupal.Semantics.FunctionT.EmptyString return $this->t(''); } /** * {@inheritdoc} */ Loading core/modules/user/tests/src/Functional/UserLogoutTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,9 @@ public function testLogout(): void { $this->drupalGet($logoutUrl, ['query' => ['token' => '123']]); $this->assertTrue($this->drupalUserIsLoggedIn($account)); $this->assertSession()->addressEquals($confirmUrl); // Test to ensure the text 'This action cannot be undone.' is not // present on the page. $this->assertSession()->pageTextNotContains('This action cannot be undone.'); // Submitting the confirmation form correctly logs the user out. $this->submitForm([], 'Log out'); $this->assertFalse($this->drupalUserIsLoggedIn($account)); Loading Loading
core/modules/user/src/Form/UserLogoutConfirm.php +8 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,14 @@ public function getConfirmText(): TranslatableMarkup { return $this->t('Log out'); } /** * {@inheritdoc} */ public function getDescription() { // phpcs:ignore Drupal.Semantics.FunctionT.EmptyString return $this->t(''); } /** * {@inheritdoc} */ Loading
core/modules/user/tests/src/Functional/UserLogoutTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,9 @@ public function testLogout(): void { $this->drupalGet($logoutUrl, ['query' => ['token' => '123']]); $this->assertTrue($this->drupalUserIsLoggedIn($account)); $this->assertSession()->addressEquals($confirmUrl); // Test to ensure the text 'This action cannot be undone.' is not // present on the page. $this->assertSession()->pageTextNotContains('This action cannot be undone.'); // Submitting the confirmation form correctly logs the user out. $this->submitForm([], 'Log out'); $this->assertFalse($this->drupalUserIsLoggedIn($account)); Loading