You are here

protected function FieldDefinitionListenerTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Field/FieldDefinitionListenerTest.php \Drupal\Tests\Core\Field\FieldDefinitionListenerTest::setUp()
  2. 10 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 63

Class

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

Namespace

Drupal\Tests\Core\Field

Code

protected function setUp() {
  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());
}