public function EntityReferenceTestBase::testPrepareTarget in Feeds 8.3
@covers ::prepareTarget
Overrides FieldTargetTestBase::testPrepareTarget
1 method overrides EntityReferenceTestBase::testPrepareTarget()
- EntityReferenceTest::testPrepareTarget in tests/
src/ Unit/ Feeds/ Target/ EntityReferenceTest.php - @covers ::prepareTarget
File
- tests/
src/ Unit/ Feeds/ Target/ EntityReferenceTestBase.php, line 134
Class
- EntityReferenceTestBase
- Base class for entity reference target tests.
Namespace
Drupal\Tests\feeds\Unit\Feeds\TargetCode
public function testPrepareTarget() {
$field_definition_mock = $this
->getMockFieldDefinition();
$field_definition_mock
->expects($this
->once())
->method('getSetting')
->will($this
->returnValue($this
->getReferencableEntityTypeId()));
$method = $this
->getMethod($this
->getTargetClass(), 'prepareTarget')
->getClosure();
$this
->assertInstanceof(FieldTargetDefinition::class, $method($field_definition_mock));
}