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