$this->
createMock(CustomEntitySchemaUpdater::
class),
$this->
createMock(CustomEntityLifecycleService::
class),
$this->pluginServiceMock,
$this->
createMock(VersionSanitizer::
class),
);
} // +++++ InstallPlugin method ++++
public function testInstallPlugin(): void
{ $pluginEntityMock =
$this->
getPluginEntityMock();
$context = Context::
createDefaultContext();
/** postInstall is called */
$this->pluginMock->
expects(static::
once())->
method('postInstall'
);
$this->pluginLifecycleService->
installPlugin($pluginEntityMock,
$context);
$returnedEvents =
$this->eventDispatcher->
getEvents();
static::
assertInstanceOf(PluginPreInstallEvent::
class,
$returnedEvents[0
]);
static::
assertInstanceOf(PluginPostInstallEvent::
class,
$returnedEvents[1
]);