| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function test_send_calls_adapter_send() |
||
| 36 | { |
||
| 37 | $this->adapter->expects($this->once()) |
||
|
|
|||
| 38 | ->method('send') |
||
| 39 | ->with($this->message) |
||
| 40 | ->will($this->returnValue('response text')); |
||
| 41 | |||
| 42 | $conn = new Connection($this->adapter); |
||
| 43 | $res = $conn->send($this->message); |
||
| 44 | |||
| 45 | $this->assertInternalType('string', $res); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
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: