function FieldDefinitionListenerTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php \Drupal\Tests\Core\Field\FieldDefinitionListenerTest::setUp()
  2. 8.9.x core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php \Drupal\Tests\Core\Field\FieldDefinitionListenerTest::setUp()
  3. 11.x core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php \Drupal\Tests\Core\Field\FieldDefinitionListenerTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php, line 64

Class

FieldDefinitionListenerTest
@coversDefaultClass \Drupal\Core\Field\FieldDefinitionListener @group Field

Namespace

Drupal\Tests\Core\Field

Code

protected function setUp() : void {
    parent::setUp();
    $this->keyValueFactory = $this->prophesize(KeyValueFactoryInterface::class);
    $this->entityTypeManager = $this->prophesize(EntityTypeManagerInterface::class);
    $this->entityFieldManager = $this->prophesize(EntityFieldManagerInterface::class);
    $this->cacheBackend = $this->prophesize(CacheBackendInterface::class);
    $this->fieldDefinitionListener = new FieldDefinitionListener($this->entityTypeManager
        ->reveal(), $this->entityFieldManager
        ->reveal(), $this->keyValueFactory
        ->reveal(), $this->cacheBackend
        ->reveal());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.