public function testRefreshPluginsExistingWithPluginUpdate(): void
{ $installedAt =
(new \
DateTime())->
format(Defaults::STORAGE_DATE_TIME_FORMAT
);
$this->
createPlugin($this->pluginRepo,
$this->context, SwagTest::PLUGIN_OLD_VERSION,
$installedAt);
$this->pluginService->
refreshPlugins($this->context,
new NullIO());
$plugin =
$this->
fetchSwagTestPluginEntity();
static::
assertSame(SwagTest::
class,
$plugin->
getBaseClass());
static::
assertSame(SwagTest::PLUGIN_LABEL,
$plugin->
getLabel());
static::
assertSame(SwagTest::PLUGIN_VERSION,
$plugin->
getUpgradeVersion());
} public function testRefreshPluginsExistingNotInstalledWithPluginUpdate(): void
{ $this->
createPlugin($this->pluginRepo,
$this->context, SwagTest::PLUGIN_OLD_VERSION
);
$this->pluginService->
refreshPlugins($this->context,
new NullIO());
$plugin =
$this->
fetchSwagTestPluginEntity();
static::
assertSame(SwagTest::
class,
$plugin->
getBaseClass());