PathautoPatternTest.php in Lightning Layout 8
File
modules/lightning_landing_page/tests/src/Functional/PathautoPatternTest.php
View source
<?php
namespace Drupal\Tests\lightning_landing_page\Functional;
use Drupal\node\Entity\Node;
use Drupal\node\NodeInterface;
use Drupal\Tests\BrowserTestBase;
class PathautoPatternTest extends BrowserTestBase {
protected static $modules = [
'lightning_landing_page',
'pathauto',
];
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);
}
}