You are here

private function NavigationalStructureTest::assertCorrectPageOnRoute in Entity Construction Kit (ECK) 8

Asserts that the page on a given route contains all the elements we expect.

Parameters

string $route: The route to test.

array $routeArguments: Arguments for the route to test.

string $expectedUrl: The expected url.

string $expectedTitle: The expected title.

array $crumbs: The expected breadcrumbs after the base crumbs.

18 calls to NavigationalStructureTest::assertCorrectPageOnRoute()
NavigationalStructureTest::entityAdd in tests/src/Functional/NavigationalStructureTest.php
Test entity creation.
NavigationalStructureTest::entityAddPage in tests/src/Functional/NavigationalStructureTest.php
Tests the entity add page.
NavigationalStructureTest::entityBundleAdd in tests/src/Functional/NavigationalStructureTest.php
Tests entity bundle creation.
NavigationalStructureTest::entityBundleDelete in tests/src/Functional/NavigationalStructureTest.php
Tests entity bundle deletion.
NavigationalStructureTest::entityBundleEdit in tests/src/Functional/NavigationalStructureTest.php
Tests entity bundle editing.

... See full list

File

tests/src/Functional/NavigationalStructureTest.php, line 119

Class

NavigationalStructureTest
Test Entity Construction Kit's navigational structure.

Namespace

Drupal\Tests\eck\Functional

Code

private function assertCorrectPageOnRoute($route, array $routeArguments, $expectedUrl, $expectedTitle, array $crumbs = []) {
  $url = Url::fromRoute($route, $routeArguments);
  self::assertEquals($expectedUrl, $url
    ->getInternalPath());
  $this
    ->drupalGet($url);
  $this
    ->assertTitleEquals($expectedTitle);
  $this
    ->assertBreadcrumbsVisible(array_merge($this->baseCrumbs, $crumbs));
}