public function PathautoTest::setUp in Tome 8
Overrides TestBase::setUp
File
- modules/
tome_sync/ tests/ src/ Kernel/ PathautoTest.php, line 33
Class
- PathautoTest
- Tests that the pathuto integration works.
Namespace
Drupal\Tests\tome_sync\KernelCode
public function setUp() {
parent::setUp();
$this
->installSchema('tome_sync', [
'tome_sync_content_hash',
]);
$this
->installEntitySchema('path_alias');
DateFormat::create([
'pattern' => 'D, m/d/Y - H:i',
'id' => 'fallback',
])
->save();
$pattern = PathautoPattern::create([
'id' => mb_strtolower($this
->randomMachineName()),
'type' => 'canonical_entities:node',
'pattern' => '/node/[node:title]',
]);
$pattern
->save();
}