protected function GatsbyEntityLoggerTest::setUp in Gatsby Live Preview & Incremental Builds 8
Same name and namespace in other branches
- 2.0.x modules/gatsby_fastbuilds/tests/src/Kernel/GatsbyEntityLoggerTest.php \Drupal\Tests\gatsby_fastbuilds\Kernel\GatsbyEntityLoggerTest::setUp()
Overrides KernelTestBase::setUp
File
- modules/
gatsby_fastbuilds/ tests/ src/ Kernel/ GatsbyEntityLoggerTest.php, line 56
Class
- GatsbyEntityLoggerTest
- Defines a test for the GatsbyEntityLogger.
Namespace
Drupal\Tests\gatsby_fastbuilds\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('path_alias');
$this
->installEntitySchema('user');
$this
->createContentType([
'type' => 'page',
]);
$this
->installEntitySchema('gatsby_log_entity');
$config_factory = \Drupal::configFactory();
$config_factory
->getEditable('gatsby.settings')
->set('preview_entity_types', [
'node',
])
->save();
$config_factory
->getEditable('gatsby_fastbuilds.settings')
->set('log_published', TRUE)
->save();
$this
->setUpCurrentUser([], [
'access content',
]);
$this
->installEntitySchema('content_moderation_state');
$workflow = $this
->createEditorialWorkflow();
$this
->addEntityTypeAndBundleToWorkflow($workflow, 'node', 'page');
}