| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function testExecute() |
||
| 16 | { |
||
| 17 | $terminalRepository = $this->createMock(TerminalRepository::class); |
||
| 18 | $altapayClient = $this->createMock(Client::class); |
||
| 19 | $terminalSynchronizer = new TerminalSynchronizer($terminalRepository, $altapayClient); |
||
| 20 | |||
| 21 | $command = new SyncTerminalsCommand($terminalSynchronizer); |
||
| 22 | |||
| 23 | $application = new Application(); |
||
| 24 | $application->setAutoExit(false); |
||
| 25 | $application->add($command); |
||
| 26 | |||
| 27 | $command = $application->find('loevgaard:dandomain:altapay:sync-terminals'); |
||
| 28 | $commandTester = new CommandTester($command); |
||
| 29 | $exitCode = $commandTester->execute([ |
||
| 30 | 'command' => $command->getName(), |
||
| 31 | ]); |
||
| 32 | |||
| 33 | $this->assertSame(0, $exitCode, 'Returns 0 in case of success'); |
||
| 34 | } |
||
| 35 | } |
||
| 36 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: