You are here

protected function MenuRouterTest::doTestMenuOptionalPlaceholders in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Menu/MenuRouterTest.php \Drupal\system\Tests\Menu\MenuRouterTest::doTestMenuOptionalPlaceholders()

Test menu links that have optional placeholders.

1 call to MenuRouterTest::doTestMenuOptionalPlaceholders()
MenuRouterTest::testMenuIntegration in core/modules/system/src/Tests/Menu/MenuRouterTest.php
Tests menu integration.

File

core/modules/system/src/Tests/Menu/MenuRouterTest.php, line 173
Contains \Drupal\system\Tests\Menu\MenuRouterTest.

Class

MenuRouterTest
Tests menu router and default menu link functionality.

Namespace

Drupal\system\Tests\Menu

Code

protected function doTestMenuOptionalPlaceholders() {
  $this
    ->drupalGet('menu-test/optional');
  $this
    ->assertResponse(200);
  $this
    ->assertText('Sometimes there is no placeholder.');
  $this
    ->drupalGet('menu-test/optional/foobar');
  $this
    ->assertResponse(200);
  $this
    ->assertText("Sometimes there is a placeholder: 'foobar'.");
}