| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function testFindTerminalByTitle() |
||
| 23 | { |
||
| 24 | $terminal = $this->getMockForAbstractClass('Loevgaard\DandomainAltapayBundle\Entity\Terminal'); |
||
| 25 | |||
| 26 | $this->manager->expects($this->once()) |
||
|
|
|||
| 27 | ->method('findTerminalByTitle') |
||
| 28 | ->with($this->equalTo('terminal')) |
||
| 29 | ->willReturn($terminal) |
||
| 30 | ; |
||
| 31 | $this->manager->findTerminalByTitle('terminal'); |
||
| 32 | } |
||
| 33 | } |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: