public function DisplayVariantOverrideTest::testEnabledRouteOverrideForSiteTemplateCausesNodeToNotBeRendered in Panels Everywhere 8.4
Verify enabling override has no effect on rendering of the site_template.
File
- tests/
src/ Functional/ DisplayVariantOverrideTest.php, line 75
Class
- DisplayVariantOverrideTest
- Make sure the route override behaviour works as intended.
Namespace
Drupal\Tests\panels_everywhere\FunctionalCode
public function testEnabledRouteOverrideForSiteTemplateCausesNodeToNotBeRendered() {
$site_template = $this->pageStorage
->load('site_template');
$site_template
->setStatus(TRUE);
$site_template
->save();
$defaultVariant = $site_template
->getVariant('panels_everywhere');
$defaultVariant
->set('route_override_enabled', TRUE);
$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);
}