You are here

protected function FieldTargetDefinitionTest::createFieldDefinition in Feeds 8.3

Creates a prophesized field definition.

Return value

\Prophecy\Prophecy\ProphecyInterface|\Drupal\Core\Field\FieldDefinitionInterface A prophesized field definition.

6 calls to FieldTargetDefinitionTest::createFieldDefinition()
FieldTargetDefinitionTest::testGetPropertyDescription in tests/src/Unit/FieldTargetDefinitionTest.php
Tests that the description is taken from field definition.
FieldTargetDefinitionTest::testGetPropertyDescriptionOfNonExistingProperty in tests/src/Unit/FieldTargetDefinitionTest.php
Tests no errors when the description for a custom property isn't set.
FieldTargetDefinitionTest::testGetPropertyDescriptionWithCustomSetDescription in tests/src/Unit/FieldTargetDefinitionTest.php
Tests that a custom set property description takes precedence.
FieldTargetDefinitionTest::testGetPropertyLabel in tests/src/Unit/FieldTargetDefinitionTest.php
Tests that the label is taken from field definition.
FieldTargetDefinitionTest::testGetPropertyLabelOfNonExistingProperty in tests/src/Unit/FieldTargetDefinitionTest.php
Tests no errors when the label for a custom property isn't set.

... See full list

File

tests/src/Unit/FieldTargetDefinitionTest.php, line 46

Class

FieldTargetDefinitionTest
@coversDefaultClass \Drupal\feeds\FieldTargetDefinition @group feeds

Namespace

Drupal\Tests\feeds\Unit

Code

protected function createFieldDefinition() {
  $field_definition = $this
    ->prophesize(FieldDefinitionInterface::class);
  $field_definition
    ->getItemDefinition()
    ->willReturn($this->itemDefinition
    ->reveal());
  return $field_definition;
}