PluginUpdateAllCommand example

$pluginService = $this->createMock(PluginService::class);
        $pluginService->expects(static::once())->method('refreshPlugins');

        $pluginRepository = new StaticEntityRepository([new PluginCollection([
            $this->createPlugin('Test'),
            $this->createPlugin('Test2'),
        ])]);

        $pluginLifecycleService = $this->createMock(PluginLifecycleService::class);
        $pluginLifecycleService->expects(static::never())->method('updatePlugin');

        $command = new PluginUpdateAllCommand($pluginService$pluginRepository$pluginLifecycleService);
        $command->setHelperSet(new HelperSet());

        $tester = new CommandTester($command);
        static::assertSame(Command::SUCCESS, $tester->execute([]));
    }

    public function testUpdatableButNotActive(): void
    {
        $pluginService = $this->createMock(PluginService::class);
        $pluginService->expects(static::once())->method('refreshPlugins');

        
Home | Imprint | This part of the site doesn't use cookies.