public function EntityHelper::getEntityTypeManagerMock in Feeds Paragraphs 8
Creates entity manager instance.
Return value
File
- tests/
src/ Unit/ Helpers/ EntityHelper.php, line 215
Class
Namespace
Drupal\Tests\feeds_para_mapper\Unit\HelpersCode
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;
}