public function PathautoPatternTest::testPagePattern in Lightning Core 8
Same name and namespace in other branches
- 8.5 modules/lightning_page/tests/src/Functional/PathautoPatternTest.php \Drupal\Tests\lightning_page\Functional\PathautoPatternTest::testPagePattern()
- 8.2 modules/lightning_page/tests/src/Functional/PathautoPatternTest.php \Drupal\Tests\lightning_page\Functional\PathautoPatternTest::testPagePattern()
- 8.3 modules/lightning_page/tests/src/Functional/PathautoPatternTest.php \Drupal\Tests\lightning_page\Functional\PathautoPatternTest::testPagePattern()
- 8.4 modules/lightning_page/tests/src/Functional/PathautoPatternTest.php \Drupal\Tests\lightning_page\Functional\PathautoPatternTest::testPagePattern()
Tests that Basic Page nodes are available at path '/[node:title]'.
File
- modules/
lightning_page/ tests/ src/ Functional/ PathautoPatternTest.php, line 27
Class
- PathautoPatternTest
- @group lightning @group lightning_core @group lightning_page
Namespace
Drupal\Tests\lightning_page\FunctionalCode
public function testPagePattern() {
$node = Node::create([
'type' => 'page',
'title' => 'Foo Bar',
'status' => NodeInterface::PUBLISHED,
]);
$node
->save();
$this
->drupalGet('/foo-bar');
$this
->assertSession()
->pageTextContains('Foo Bar');
$this
->assertSession()
->statusCodeEquals(200);
}