assertNoLink example

    // it is rendered correctly.     $this->assertLink('barry (not verified)');

    $account_switcher->switchTo(new AnonymousUserSession());
    $executable = Views::getView($view_id);
    $executable->storage->invalidateCaches();

    $build = $executable->preview();
    $this->setRawContent($renderer->renderRoot($build));

    // No access to user-profiles, so shouldn't be able to see links.     $this->assertNoLink($this->adminUser->label());
    // Note: External users aren't pointing to drupal user profiles.     $this->assertLink('barry (not verified)');
    $this->assertLink('My comment title');
    $this->assertLink('Anonymous comment title');
  }

}
Home | Imprint | This part of the site doesn't use cookies.