protected function NodeTest::setUp in Token 8
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ NodeTest.php, line 26
Class
- NodeTest
- Test the node and content type tokens.
Namespace
Drupal\Tests\token\KernelCode
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('user');
$this
->installEntitySchema('node');
$node_type = NodeType::create([
'type' => 'page',
'name' => 'Basic page',
'description' => "Use <em>basic pages</em> for your static content, such as an 'About us' page.",
]);
$node_type
->save();
$node_type = NodeType::create([
'type' => 'article',
'name' => 'Article',
'description' => "Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.",
]);
$node_type
->save();
}