You are here

public function EntityHelper::getEntityTypeManagerMock in Feeds Paragraphs 8

Creates entity manager instance.

Return value

ObjectProphecy

File

tests/src/Unit/Helpers/EntityHelper.php, line 215

Class

EntityHelper

Namespace

Drupal\Tests\feeds_para_mapper\Unit\Helpers

Code

public function getEntityTypeManagerMock() {
  $manager = $this->prophet
    ->prophesize('Drupal\\Core\\Entity\\EntityTypeManagerInterface');
  $storage = $this
    ->getStorageMock()
    ->reveal();
  try {
    $manager
      ->getStorage(Argument::type('string'))
      ->willReturn($storage);
  } catch (InvalidPluginDefinitionException $e) {
  } catch (PluginNotFoundException $e) {
  }
  return $manager;
}