Conditions | 2 |
Paths | 2 |
Total Lines | 29 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function testGetAllCycleTimeColumns() |
||
27 | { |
||
28 | $from = 'from'; |
||
29 | $to = 'to'; |
||
30 | |||
31 | $cardHistory = $this->prophesize(HistoryCard::class); |
||
32 | $cardHistory->getFrom()->willReturn($from); |
||
33 | $cardHistory->getTo()->willReturn($to); |
||
34 | |||
35 | $cardHistory2 = $this->prophesize(HistoryCard::class); |
||
36 | $cardHistory2->getFrom()->willReturn($from); |
||
37 | $cardHistory2->getTo()->willReturn($to); |
||
38 | |||
39 | $cardHistories = [ |
||
40 | $cardHistory->reveal(), |
||
41 | $cardHistory->reveal(), |
||
42 | $cardHistory2->reveal() |
||
43 | ]; |
||
44 | |||
45 | $cycleTimes = $this->cycleTimeCollection->getFromCardHistory($cardHistories); |
||
46 | |||
47 | $this->assertCount(1, $cycleTimes); |
||
|
|||
48 | |||
49 | foreach ($cycleTimes as $cycleTimeColumn) { |
||
50 | $this->assertEquals('from', $cycleTimeColumn->getFrom()); |
||
51 | $this->assertEquals('to', $cycleTimeColumn->getTo()); |
||
52 | $this->assertEquals('from_to', $cycleTimeColumn->getName()); |
||
53 | } |
||
54 | } |
||
55 | } |
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: