public function FieldTargetDefinitionTest::testGetPropertyDescriptionWithCustomSetDescription in Feeds 8.3
Tests that a custom set property description takes precedence.
@covers ::getPropertyDescription
File
- tests/
src/ Unit/ FieldTargetDefinitionTest.php, line 132
Class
- FieldTargetDefinitionTest
- @coversDefaultClass \Drupal\feeds\FieldTargetDefinition @group feeds
Namespace
Drupal\Tests\feeds\UnitCode
public function testGetPropertyDescriptionWithCustomSetDescription() {
$this->propertyDefinition
->getDescription()
->willReturn('Foo description');
$this->itemDefinition
->getPropertyDefinition('foo')
->willReturn($this->propertyDefinition
->reveal());
$field_definition = $this
->createFieldDefinition();
$target_definition = FieldTargetDefinition::createFromFieldDefinition($field_definition
->reveal());
$target_definition
->addProperty('foo', 'Custom label', 'Custom description');
$this
->assertEquals('Custom description', $target_definition
->getPropertyDescription('foo'));
}