You are here

protected function PageManagerAdminTest::doTestDisablePage in Page Manager 8

Tests disabling a page.

1 call to PageManagerAdminTest::doTestDisablePage()
PageManagerAdminTest::testAdmin in page_manager_ui/src/Tests/PageManagerAdminTest.php
Tests the Page Manager admin UI.

File

page_manager_ui/src/Tests/PageManagerAdminTest.php, line 253
Contains \Drupal\page_manager_ui\Tests\PageManagerAdminTest.

Class

PageManagerAdminTest
Tests the admin UI for page entities.

Namespace

Drupal\page_manager_ui\Tests

Code

protected function doTestDisablePage() {
  $this
    ->drupalGet('admin/foo');
  $this
    ->assertResponse(403);
  $this
    ->drupalGet('admin/structure/page_manager');
  $this
    ->clickLink('Disable');
  $this
    ->drupalGet('admin/foo');

  // The page should not be found if the page is enabled.
  $this
    ->assertResponse(404);
  $this
    ->drupalGet('admin/structure/page_manager');
  $this
    ->clickLink('Enable');
  $this
    ->drupalGet('admin/foo');

  // Re-enabling the page should make this path available.
  $this
    ->assertResponse(403);
}