public function PathautoPatternTest::testLandingPagePattern in Lightning Layout 8
Same name and namespace in other branches
- 8.2 modules/lightning_landing_page/tests/src/Functional/PathautoPatternTest.php \Drupal\Tests\lightning_landing_page\Functional\PathautoPatternTest::testLandingPagePattern()
Tests that Landing page nodes are available at path '/[node:title]'.
File
- modules/
lightning_landing_page/ tests/ src/ Functional/ PathautoPatternTest.php, line 26
Class
- PathautoPatternTest
- @group lightning_layout @group lightning_landing_page
Namespace
Drupal\Tests\lightning_landing_page\FunctionalCode
public function testLandingPagePattern() {
$node = Node::create([
'type' => 'landing_page',
'title' => 'Foo Bar',
'status' => NodeInterface::PUBLISHED,
'uid' => 1,
]);
$node
->save();
$this
->drupalGet('/foo-bar');
$this
->assertSession()
->pageTextContains('Foo Bar');
$this
->assertSession()
->statusCodeEquals(200);
}