static::
assertArrayHasKey(PluginPostDeactivateEvent::
class,
$events);
static::
assertEquals('afterPluginStateChange',
$events[PluginPostDeactivateEvent::
class]);
static::
assertArrayHasKey(PluginPostUpdateEvent::
class,
$events);
static::
assertEquals('afterPluginStateChange',
$events[PluginPostUpdateEvent::
class]);
} public function testRegisterScheduledTasks(): void
{ $taskRegistry =
$this->
createMock(TaskRegistry::
class);
$taskRegistry->
expects(static::
once())->
method('registerTasks'
);
$signalCachePool =
new MemoryCacheItemPool();
$subscriber =
new PluginLifecycleSubscriber($taskRegistry,
$signalCachePool);
$subscriber->
afterPluginStateChange();
static::
assertTrue($signalCachePool->
hasItem(StopWorkerOnRestartSignalListener::RESTART_REQUESTED_TIMESTAMP_KEY
));
}}