You are here

public function PanelsEverywhereTest::testCallingSiteTemplateConfigurationPath in Panels Everywhere 8.4

Verify that visiting the path of site_template does not break anything.

File

tests/src/Functional/PanelsEverywhereTest.php, line 177

Class

PanelsEverywhereTest
Make sure that PE can be enabled.

Namespace

Drupal\Tests\panels_everywhere\Functional

Code

public function testCallingSiteTemplateConfigurationPath() {
  $this
    ->enableSiteTemplate();
  $siteTemplate = $this
    ->loadSiteTemplate();
  $this
    ->drupalGet($siteTemplate
    ->getPath());
  $this
    ->assertSession()
    ->statusCodeEquals(404);
  $defaultVariant = $siteTemplate
    ->getVariant('panels_everywhere');
  $this
    ->placeBlockOnVariant($defaultVariant, 'system_main_block', 'content');
  $defaultVariant
    ->save();

  // @todo: Remove once cache info is setup correctly
  drupal_flush_all_caches();
  $this
    ->drupalGet($siteTemplate
    ->getPath());
  $this
    ->assertSession()
    ->statusCodeEquals(404);
}