You are here

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

FpmTestBase

Namespace

Drupal\Tests\feeds_para_mapper\Unit

Code

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();
}