protected function NormalizerTestBase::setUp in Replication 8.2
Overrides KernelTestBase::setUp
9 calls to NormalizerTestBase::setUp()
- AttachmentNormalizerTest::setUp in tests/
src/ Unit/ Normalizer/ AttachmentNormalizerTest.php - BulkDocsNormalizerTest::setUp in tests/
src/ Unit/ Normalizer/ BulkDocsNormalizerTest.php - ContentEntityNormalizerAlterTest::setUp in tests/
src/ Unit/ Normalizer/ ContentEntityNormalizerAlterTest.php - ContentEntityNormalizerTest::setUp in tests/
src/ Unit/ Normalizer/ ContentEntityNormalizerTest.php - EntityReferenceItemNormalizerTest::setUp in tests/
src/ Unit/ Normalizer/ EntityReferenceItemNormalizerTest.php
9 methods override NormalizerTestBase::setUp()
- AttachmentNormalizerTest::setUp in tests/
src/ Unit/ Normalizer/ AttachmentNormalizerTest.php - BulkDocsNormalizerTest::setUp in tests/
src/ Unit/ Normalizer/ BulkDocsNormalizerTest.php - ContentEntityNormalizerAlterTest::setUp in tests/
src/ Unit/ Normalizer/ ContentEntityNormalizerAlterTest.php - ContentEntityNormalizerTest::setUp in tests/
src/ Unit/ Normalizer/ ContentEntityNormalizerTest.php - EntityReferenceItemNormalizerTest::setUp in tests/
src/ Unit/ Normalizer/ EntityReferenceItemNormalizerTest.php
File
- tests/
src/ Unit/ Normalizer/ NormalizerTestBase.php, line 37
Class
Namespace
Drupal\Tests\replication\Unit\NormalizerCode
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('entity_test_mulrev');
$this
->installEntitySchema('user');
$this
->installSchema('system', [
'url_alias',
'router',
]);
$this
->installSchema('key_value', [
'key_value_sorted',
]);
$this
->installConfig([
'multiversion',
'replication',
]);
\Drupal::service('multiversion.manager')
->enableEntityTypes();
\Drupal::service('router.builder')
->rebuild();
// Auto-create a field for testing.
FieldStorageConfig::create([
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_text',
'type' => 'text',
'cardinality' => 1,
'translatable' => FALSE,
])
->save();
FieldConfig::create([
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_text',
'bundle' => 'entity_test_mulrev',
'label' => 'Test text-field',
'widget' => [
'type' => 'text_textfield',
'weight' => 0,
],
])
->save();
$this->serializer = $this->container
->get('replication.serializer');
// Create default workspace.
Workspace::create([
'machine_name' => 'live',
'label' => 'Live',
'type' => 'basic',
])
->save();
}