Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function testMergeFile() |
||
27 | { |
||
28 | static::assertInstanceOf(Config::class, $this->config); |
||
29 | static::assertEquals([], $this->config->toArray()); |
||
30 | |||
31 | $this->config->mergeFile(TEST_FIXTURE_PATH.'/general.ini'); |
||
32 | |||
33 | static::assertInstanceOf(Config::class, $this->config); |
||
34 | static::assertCount(6, $this->config->toArray()); |
||
|
|||
35 | static::assertInstanceOf(Config::class, $this->config->get('SITE')); |
||
36 | static::assertTrue($this->config->has('META')); |
||
37 | static::assertTrue($this->config->has('META.title')); |
||
38 | static::assertEquals('My Site', $this->config->get('META')->get('title')); |
||
39 | static::assertEquals('My Site', $this->config->get('META.title')); |
||
40 | static::assertFalse($this->config->has('META.title1')); |
||
41 | } |
||
42 | } |
||
43 |
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: