10 use Symfony\Component\Console\Tester\CommandTester;
29 $this->cacheManagerMock->expects($this->once())->method(
'getAvailableTypes')->willReturn([
'A',
'B',
'C']);
30 $this->cacheManagerMock->expects($this->once())
31 ->method(
'setEnabled')
34 $cleanInvocationCount =
$result === [] ? 0 : 1;
35 $this->cacheManagerMock->expects($this->exactly($cleanInvocationCount))
39 $commandTester =
new CommandTester($this->command);
40 $commandTester->execute($param);
42 $this->assertEquals(
$output, $commandTester->getDisplay());
52 $output .=
'Cleaned cache types:' . PHP_EOL;
53 $output .= implode(PHP_EOL, $enabled) . PHP_EOL;
getExpectedExecutionOutput(array $enabled)
getExpectedChangeOutput(array $changes, $enabled)
testExecute($param, $enable, $result, $output)