PathautoPatternTest.php in Lightning Layout 8.2
File
modules/lightning_landing_page/tests/src/Functional/PathautoPatternTest.php
View source
<?php
namespace Drupal\Tests\lightning_landing_page\Functional;
use Drupal\Tests\BrowserTestBase;
class PathautoPatternTest extends BrowserTestBase {
protected $defaultTheme = 'stark';
protected static $modules = [
'lightning_landing_page',
];
public function testLandingPagePattern() {
$this->container
->get('module_installer')
->install([
'pathauto',
]);
$node = $this
->drupalCreateNode([
'type' => 'landing_page',
]);
$this
->assertSame(SAVED_UPDATED, $node
->setTitle('Foo Bar')
->setPublished()
->save());
$this
->drupalGet('/foo-bar');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->pageTextContains($node
->getTitle());
}
}