detector = $this->createMock(Detection::class);
$this->cacheFactory = $this->createMock(ICacheFactory::class);
$this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock();
$this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock();
$this->command = new UpdateTheme($this->detector, $this->cacheFactory);
}
public function testThemeUpdate(): void {
$this->consoleInput->method('getOption')
->with('maintenance:theme:update')
->willReturn(true);
$this->detector->expects($this->once())
->method('getAllAliases')
->willReturn([]);
$cache = $this->createMock(ICache::class);
$cache->expects($this->once())
->method('clear')
->with('');
$this->cacheFactory->expects($this->once())
->method('createDistributed')
->with('imagePath')
->willReturn($cache);
self::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]);
}
}
21f930'>dependabot/github_actions/github-actions-ced721f930
blob: a0d5d364767ee19cdd7e3a5c1331029e536a9b86 (
plain)