| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function testEvent() |
||
| 24 | { |
||
| 25 | $message = uniqid('message_'); |
||
| 26 | $connectionName = uniqid('connection_'); |
||
| 27 | $job = $this->createMock(JobContractInterface::class); |
||
| 28 | $exception = new Exception($message); |
||
| 29 | |||
| 30 | $event = new JobFailedEvent($connectionName, $job, $exception); |
||
|
|
|||
| 31 | |||
| 32 | self::assertInstanceOf(Event::class, $event); |
||
| 33 | self::assertEquals($connectionName, $event->getConnectionName()); |
||
| 34 | self::assertEquals($job, $event->getJob()); |
||
| 35 | self::assertEquals($exception, $event->getException()); |
||
| 36 | self::assertEquals($exception->getMessage(), $event->getException()->getMessage()); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |
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: