protected function GatsbyInstantPreviewTest::setUp in Gatsby Live Preview & Incremental Builds 8
Same name and namespace in other branches
- 2.0.x modules/gatsby_instantpreview/tests/src/Kernel/GatsbyInstantPreviewTest.php \Drupal\Tests\gatsby_instantpreview\Kernel\GatsbyInstantPreviewTest::setUp()
Overrides KernelTestBase::setUp
File
- modules/
gatsby_instantpreview/ tests/ src/ Kernel/ GatsbyInstantPreviewTest.php, line 53
Class
- GatsbyInstantPreviewTest
- Defines a test for the GatsbyInstantPreview.
Namespace
Drupal\Tests\gatsby_instantpreview\KernelCode
protected function setUp() : void {
parent::setUp();
$this
->installConfig([
'node',
'filter',
]);
$this
->installSchema('system', [
'sequences',
]);
$this
->installSchema('node', [
'node_access',
]);
$this
->installEntitySchema('node');
$this
->installEntitySchema('user');
$this
->installEntitySchema('path_alias');
$this
->createContentType([
'type' => 'page',
]);
$config_factory = \Drupal::configFactory();
$config_factory
->getEditable('gatsby.settings')
->set('preview_entity_types', [
'node',
])
->save();
$this
->setUpCurrentUser([], [
'access content',
]);
$this
->createEntityReferenceField('node', 'page', 'field_reference', 'Referencs', 'node');
}