diff --git a/core/modules/tracker/tests/src/Functional/TrackerTest.php b/core/modules/tracker/tests/src/Functional/TrackerTest.php index b77605a0514875a14f2c9ca22759f520484dfc5c..28a18b968287f6dc9e73035b8925ad4208cd913c 100644 --- a/core/modules/tracker/tests/src/Functional/TrackerTest.php +++ b/core/modules/tracker/tests/src/Functional/TrackerTest.php @@ -91,7 +91,7 @@ public function testTrackerAll() { $this->drupalGet('activity'); $this->assertNoText($unpublished->label(), 'Unpublished node does not show up in the tracker listing.'); $this->assertText($published->label(), 'Published node shows up in the tracker listing.'); - $this->assertLink(t('My recent content'), 0, 'User tab shows up on the global tracker page.'); + $this->assertSession()->linkExists(t('My recent content'), 0, 'User tab shows up on the global tracker page.'); // Assert cache contexts, specifically the pager and node access contexts. $this->assertCacheContexts(['languages:language_interface', 'route', 'theme', 'url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT, 'url.query_args.pagers:0', 'user.node_grants:view', 'user']); @@ -208,8 +208,8 @@ public function testTrackerUser() { $this->assertCacheTags($expected_tags); $this->assertCacheContexts(['languages:language_interface', 'route', 'theme', 'url.query_args:' . MainContentViewSubscriber::WRAPPER_FORMAT, 'url.query_args.pagers:0', 'user', 'user.node_grants:view']); - $this->assertLink($my_published->label()); - $this->assertNoLink($unpublished->label()); + $this->assertSession()->linkExists($my_published->label()); + $this->assertSession()->linkNotExists($unpublished->label()); // Verify that title and tab title have been set correctly. $this->assertText('Activity', 'The user activity tab has the name "Activity".'); $this->assertTitle($this->user->getAccountName() . ' | Drupal'); diff --git a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php index 0df6f40232e1282b1edfb68b2b4b16d726ea6d4d..44e4cae14a9ea84dbf608cb8bfd5d70802b99642 100644 --- a/core/modules/user/tests/src/Functional/UserPasswordResetTest.php +++ b/core/modules/user/tests/src/Functional/UserPasswordResetTest.php @@ -109,7 +109,7 @@ public function testUserPasswordReset() { // Check successful login. $this->drupalPostForm(NULL, NULL, t('Log in')); - $this->assertLink(t('Log out')); + $this->assertSession()->linkExists(t('Log out')); $this->assertTitle($this->account->getAccountName() . ' | Drupal'); // Change the forgotten password. @@ -188,7 +188,7 @@ public function testUserPasswordReset() { $this->drupalPostForm(NULL, $edit, t('Submit')); $reset_url = $this->getResetURL(); $this->drupalGet($reset_url . '/login'); - $this->assertLink(t('Log out')); + $this->assertSession()->linkExists(t('Log out')); $this->assertTitle($this->account->getAccountName() . ' | Drupal'); // Ensure blocked and deleted accounts can't access the user.reset.login @@ -358,7 +358,7 @@ public function testUserResetPasswordUserFloodControlIsCleared() { // Use the last password reset URL which was generated. $reset_url = $this->getResetURL(); $this->drupalGet($reset_url . '/login'); - $this->assertLink(t('Log out')); + $this->assertSession()->linkExists(t('Log out')); $this->assertTitle($this->account->getAccountName() . ' | Drupal'); $this->drupalLogout();