private function FpmTestBase::getPluginManagerMock in Feeds Paragraphs 8
Creates FeedsPluginManager instance.
Return value
FeedsPluginManager A mocked feeds plugin manager instance.
2 calls to FpmTestBase::getPluginManagerMock()
- FpmTestBase::getMapperObject in tests/
src/ Unit/ FpmTestBase.php - Generates a mapper object.
- FpmTestBase::initWrapper in tests/
src/ Unit/ FpmTestBase.php - Instantiates and returns a WrapperTarget object.
File
- tests/
src/ Unit/ FpmTestBase.php, line 245
Class
Namespace
Drupal\Tests\feeds_para_mapper\UnitCode
private function getPluginManagerMock() {
$manager = $this
->prophesize(FeedsPluginManager::class);
try {
$manager
->createInstance(Argument::type('string'), Argument::type('array'))
->willReturn($this->target);
} catch (PluginException $e) {
}
$manager
->getDefinitions()
->willReturn($this
->generatePluginDefinitions());
return $manager
->reveal();
}