You are here

public function DisplayVariantOverrideTest::testDisabledRouteOverrideForSiteTemplateCausesNodeToNotBeRendered in Panels Everywhere 8.4

Verify disabling override has no effect on rendering of the site_template.

File

tests/src/Functional/DisplayVariantOverrideTest.php, line 53

Class

DisplayVariantOverrideTest
Make sure the route override behaviour works as intended.

Namespace

Drupal\Tests\panels_everywhere\Functional

Code

public function testDisabledRouteOverrideForSiteTemplateCausesNodeToNotBeRendered() {
  $site_template = $this->pageStorage
    ->load('site_template');
  $site_template
    ->setStatus(TRUE);
  $site_template
    ->save();
  $defaultVariant = $site_template
    ->getVariant('panels_everywhere');
  $this
    ->placeBlockOnVariant($defaultVariant, 'system_main_block', 'content');
  $this
    ->placeBlockOnVariant($defaultVariant, 'system_powered_by_block', 'content');
  $defaultVariant
    ->save();

  // @todo: Remove once cache info is setup correctly
  drupal_flush_all_caches();
  $this
    ->drupalGet('node/' . $this->node
    ->id());
  $this
    ->assertSession()
    ->pageTextContains('Powered by');
  $this
    ->assertSession()
    ->pageTextContains($this->node->body->value);
}