Unverified Commit 8130d889 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3139414 by cburschka, mohrerao, pavnish, jungle, ravi.shankar, daffie,...

Issue #3139414 by cburschka, mohrerao, pavnish, jungle, ravi.shankar, daffie, mondrake, sja112: Replace usages of deprecated AssertLegacyTrait::assert(No)Link()
parent fd046df3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ public function testBasicAuth() {

    // Ensure that a route without basic auth defined doesn't allow login.
    $this->basicAuthGet(Url::fromRoute('system.admin'), $account->getAccountName(), $account->pass_raw);
    $this->assertNoLink('Log out', 'User is not logged in');
    $this->assertSession()->linkNotExists('Log out', 'User is not logged in');
    $this->assertSession()->statusCodeEquals(403);
    $this->mink->resetSessions();

+4 −4
Original line number Diff line number Diff line
@@ -152,9 +152,9 @@ public function testBlockAdminUiPage() {
    \Drupal::service('theme_installer')->install(['stable', 'stark']);
    $this->drupalGet('admin/structure/block');
    $theme_handler = \Drupal::service('theme_handler');
    $this->assertLink($theme_handler->getName('classy'));
    $this->assertLink($theme_handler->getName('stark'));
    $this->assertNoLink($theme_handler->getName('stable'));
    $this->assertSession()->linkExists($theme_handler->getName('classy'));
    $this->assertSession()->linkExists($theme_handler->getName('stark'));
    $this->assertSession()->linkNotExists($theme_handler->getName('stable'));

    // Ensure that a hidden theme cannot use the block demo page.
    $this->drupalGet('admin/structure/block/list/stable');
@@ -166,7 +166,7 @@ public function testBlockAdminUiPage() {
    \Drupal::service('router.builder')->rebuildIfNeeded();
    $this->drupalPlaceBlock('local_tasks_block', ['region' => 'header', 'theme' => 'stable']);
    $this->drupalGet('admin/structure/block');
    $this->assertLink($theme_handler->getName('stable'));
    $this->assertSession()->linkExists($theme_handler->getName('stable'));
    $this->drupalGet('admin/structure/block/list/stable');
    $this->assertSession()->statusCodeEquals(200);
  }
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public function testListing() {
    $new_label = 'Albatross';
    // Add a new entity using the operations link.
    $link_text = t('Add custom block');
    $this->assertLink($link_text);
    $this->assertSession()->linkExists($link_text);
    $this->clickLink($link_text);
    $this->assertSession()->statusCodeEquals(200);
    $edit = [];
+2 −2
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ public function testListing() {
    $new_label = 'Albatross';
    // Add a new entity using the operations link.
    $link_text = t('Add custom block');
    $this->assertLink($link_text);
    $this->assertSession()->linkExists($link_text);
    $this->clickLink($link_text);
    $this->assertSession()->statusCodeEquals(200);
    $edit = [];
@@ -123,7 +123,7 @@ public function testListing() {

    // Confirm that the empty text is displayed.
    $this->assertText('There are no custom blocks available.');
    $this->assertLink('custom block');
    $this->assertSession()->linkExists('custom block');

    $block_content = BlockContent::create([
      'info' => 'Non-reusable block',
+3 −3
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ public function testBookExport() {

    // Load the book and verify there is no printer-friendly version link.
    $this->drupalGet('node/' . $this->book->id());
    $this->assertNoLink(t('Printer-friendly version'), 'Anonymous user is not shown link to printer-friendly version.');
    $this->assertSession()->linkNotExists(t('Printer-friendly version'), 'Anonymous user is not shown link to printer-friendly version.');

    // Try getting the URL directly, and verify it fails.
    $this->drupalGet('book/export/html/' . $this->book->id());
@@ -402,13 +402,13 @@ public function testBookOutline() {
    // Create new node not yet a book.
    $empty_book = $this->drupalCreateNode(['type' => 'book']);
    $this->drupalGet('node/' . $empty_book->id() . '/outline');
    $this->assertNoLink(t('Book outline'), 'Book Author is not allowed to outline');
    $this->assertSession()->linkNotExists(t('Book outline'), 'Book Author is not allowed to outline');

    $this->drupalLogin($this->adminUser);
    $this->drupalGet('node/' . $empty_book->id() . '/outline');
    $this->assertRaw(t('Book outline'));
    $this->assertOptionSelected('edit-book-bid', 0, 'Node does not belong to a book');
    $this->assertNoLink(t('Remove from book outline'));
    $this->assertSession()->linkNotExists(t('Remove from book outline'));

    $edit = [];
    $edit['book[bid]'] = '1';
Loading