protected function FieldStorageConfigEntityUnitTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php \Drupal\Tests\field\Unit\FieldStorageConfigEntityUnitTest::setUp()
- 9 core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php \Drupal\Tests\field\Unit\FieldStorageConfigEntityUnitTest::setUp()
File
- core/
modules/ field/ tests/ src/ Unit/ FieldStorageConfigEntityUnitTest.php, line 56 - Contains \Drupal\Tests\field\Unit\FieldStorageConfigEntityUnitTest.
Class
- FieldStorageConfigEntityUnitTest
- @coversDefaultClass \Drupal\field\Entity\FieldStorageConfig
Namespace
Drupal\Tests\field\UnitCode
protected function setUp() : void {
$this->entityTypeManager = $this
->createMock(EntityTypeManagerInterface::class);
$this->uuid = $this
->createMock('\\Drupal\\Component\\Uuid\\UuidInterface');
$this->fieldTypeManager = $this
->createMock(FieldTypePluginManagerInterface::class);
$container = new ContainerBuilder();
$container
->set('entity_type.manager', $this->entityTypeManager);
$container
->set('uuid', $this->uuid);
$container
->set('plugin.manager.field.field_type', $this->fieldTypeManager);
\Drupal::setContainer($container);
}