Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function testGetTaskWithPriority() |
||
28 | { |
||
29 | $command1 = $this->createMock(Command::CLASS); |
||
30 | $command2 = $this->createMock(Command::CLASS); |
||
31 | $command3 = $this->createMock(Command::CLASS); |
||
32 | |||
33 | $this->bag->addTask($command1, 10); |
||
|
|||
34 | $this->bag->addTask($command2, 20); |
||
35 | $this->bag->addTask($command3, 20); |
||
36 | |||
37 | $this->assertSame([ |
||
38 | 20 => [ |
||
39 | $command2, |
||
40 | $command3 |
||
41 | ], |
||
42 | 10 => [ |
||
43 | $command1 |
||
44 | ] |
||
45 | ], $this->bag->getTasks()); |
||
46 | } |
||
47 | } |
||
48 |
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: