1 | <?php |
||
18 | class SimpleConfigTest extends \PHPUnit\Framework\TestCase |
||
19 | { |
||
20 | protected $simpleConfig = [ |
||
21 | 'id' => 'hiart-simple-config', |
||
22 | 'basePath' => __DIR__, |
||
23 | 'components' => [ |
||
24 | 'hiart' => [ |
||
25 | 'class' => Connection::class, |
||
26 | 'requestClass' => Request::class, |
||
27 | 'baseUri' => 'https://site.com/api/v3/', |
||
28 | ], |
||
29 | ], |
||
30 | ]; |
||
31 | |||
32 | private $app; |
||
33 | private $container; |
||
34 | |||
35 | public function setUp() |
||
42 | |||
43 | public function tearDown() |
||
48 | |||
49 | public function testGetDb() |
||
55 | } |
||
56 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: