Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function testExecute() |
||
16 | { |
||
17 | $terminalManager = $this->createMock(TerminalManager::class); |
||
18 | $altapayClient = $this->createMock(Client::class); |
||
19 | $terminalSynchronizer = new TerminalSynchronizer($terminalManager, $altapayClient); |
||
20 | |||
21 | $command = new SyncTerminalsCommand(); |
||
22 | $command->setTerminalSynchronizer($terminalSynchronizer); |
||
23 | |||
24 | $application = new Application(); |
||
25 | $application->setAutoExit(false); |
||
26 | $application->add($command); |
||
27 | |||
28 | $command = $application->find('loevgaard:dandomain:altapay:sync-terminals'); |
||
29 | $commandTester = new CommandTester($command); |
||
30 | $exitCode = $commandTester->execute([ |
||
31 | 'command' => $command->getName(), |
||
32 | ]); |
||
33 | |||
34 | $this->assertSame(0, $exitCode, 'Returns 0 in case of success'); |
||
35 | } |
||
36 | } |
||
37 |