8 use Symfony\Component\Console\Tester\CommandTester;
20 private $crontabManagerMock;
25 private $commandTester;
32 $this->crontabManagerMock = $this->getMockBuilder(CrontabManagerInterface::class)
33 ->getMockForAbstractClass();
35 $this->commandTester =
new CommandTester(
45 $this->crontabManagerMock->expects($this->once())
46 ->method(
'RemoveTasks');
48 $this->commandTester->execute([]);
50 'Magento cron tasks have been removed' . PHP_EOL,
51 $this->commandTester->getDisplay()
61 $this->crontabManagerMock->expects($this->once())
62 ->method(
'RemoveTasks')
65 $this->commandTester->execute([]);
67 'Some error' . PHP_EOL,
68 $this->commandTester->getDisplay()