public function BreadcrumbTest::testOtherNodeBreadcrumb in Blog 8.2
Same name and namespace in other branches
- 3.x tests/src/Functional/BreadcrumbTest.php \Drupal\Tests\blog\Functional\BreadcrumbTest::testOtherNodeBreadcrumb()
Other node type breadcrumb test.
File
- tests/
src/ Functional/ BreadcrumbTest.php, line 61
Class
- BreadcrumbTest
- Breadcrumb test for blog module.
Namespace
Drupal\Tests\blog\FunctionalCode
public function testOtherNodeBreadcrumb() {
$article_nid = array_rand($this->articleNodes1);
$article_owner = $this->articleNodes1[$article_nid]
->getOwner();
$blog_name = $this->container
->get('blog.lister')
->userBlogTitle($article_owner);
$this
->drupalGet('node/' . $article_nid);
$links = $this
->getSession()
->getPage()
->findAll('css', '#block-breadcrumb li a');
$link = array_pop($links);
$this
->assertFalse($link
->getHtml() === $blog_name, 'Other node type breadcrumb is correct.');
}