| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function testConnect() |
||
| 24 | { |
||
| 25 | $jobResolver = $this->createMock(JobResolverInterface::class); |
||
| 26 | $mongoDriver = $this->createMock(RedisDriver::class); |
||
| 27 | |||
| 28 | $connector = new RedisConnector($jobResolver, $mongoDriver); |
||
| 29 | |||
| 30 | $config = [ |
||
| 31 | 'collection' => uniqid('collection_'), |
||
| 32 | 'queue' => uniqid('queue_'), |
||
| 33 | 'expire' => rand(1, 1000), |
||
| 34 | 'limit' => rand(1, 10), |
||
| 35 | ]; |
||
| 36 | |||
| 37 | $queue = $connector->connect($config); |
||
| 38 | |||
| 39 | self::assertInstanceOf(RedisQueue::class, $queue); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |
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: