You are here

public function EntityReferenceTest::testPrepareValueEmptyFeed in Feeds 8.3

@covers ::prepareValue

Tests prepareValue() without passing values.

Overrides EntityReferenceTestBase::testPrepareValueEmptyFeed

File

tests/src/Unit/Feeds/Target/EntityReferenceTest.php, line 101

Class

EntityReferenceTest
@coversDefaultClass \Drupal\feeds\Feeds\Target\EntityReference @group feeds

Namespace

Drupal\Tests\feeds\Unit\Feeds\Target

Code

public function testPrepareValueEmptyFeed() {
  $method = $this
    ->getProtectedClosure($this
    ->createTargetPluginInstance(), 'prepareValue');
  $values = [
    'target_id' => '',
  ];
  $this
    ->expectException(EmptyFeedException::class);
  $method(0, $values);
}