| 1 | <?php |
||
| 10 | class ConnectionTest extends \PHPUnit_Framework_TestCase |
||
| 11 | { |
||
| 12 | /** @var \PHPUnit_Framework_MockObject_MockObject|AdapterInterface */ |
||
| 13 | protected $adapter; |
||
| 14 | /** @var \PHPUnit_Framework_MockObject_MockObject|Message */ |
||
| 15 | protected $message; |
||
| 16 | |||
| 17 | public function setUp() |
||
| 28 | |||
| 29 | public function test_can_set_and_get_adapter() |
||
| 34 | |||
| 35 | public function test_send_calls_adapter_send() |
||
| 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: