public function TestImporter::testImport in Feeds Paragraphs 8
@covers ::import
File
- tests/
src/ Unit/ TestImporter.php, line 103
Class
- TestImporter
- @group Feeds Paragraphs @coversDefaultClass \Drupal\feeds_para_mapper\Importer
Namespace
Drupal\Tests\feeds_para_mapper\UnitCode
public function testImport() {
$this->entityHelper->values = array();
$feed = $this
->getFeedMock();
$entity = $this->entityHelper->node;
$config = array(
'max_values' => 1,
);
$values = array(
array(
'value' => "Test value",
),
);
$instance = $this->wrapperTarget
->createTargetInstance();
$this->importer
->import($feed, $entity
->reveal(), $this->field, $config, $values, $instance);
$this->instanceMock
->setTarget(Argument::type(FeedInterface::class), Argument::type(Paragraph::class), Argument::type('string'), Argument::type('array'))
->shouldHaveBeenCalled();
}