You are here

protected function ConfigPageTokenTest::setUp in Config Pages 8.2

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ConfigPageTokenTest.php, line 30

Class

ConfigPageTokenTest
Tests that the ConfigPages token expose works.

Namespace

Drupal\Tests\config_pages\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $configPageType = ConfigPagesType::create([
    'id' => 'config_pages_test_type',
    'label' => 'ConfigPages Test Type Label',
    'context' => [
      'show_warning' => '',
      'group' => [],
    ],
    'menu' => [
      'path' => '/admin/config_pages_test/test_page',
      'weight' => 0,
      'description' => 'Test page for ConfigPages module.',
    ],
    'token' => TRUE,
  ]);
  $configPageType
    ->save();
  $this->container
    ->get('router.builder')
    ->rebuild();
}