| @@ 40-49 (lines=10) @@ | ||
| 37 | static::assertSame($menu->reveal(), $configProvider->get('foo', ['a' => 'b'])); |
|
| 38 | } |
|
| 39 | ||
| 40 | public function testGetDoesNotExist(): void |
|
| 41 | { |
|
| 42 | $this->expectException(InvalidArgumentException::class); |
|
| 43 | ||
| 44 | $configProvider = new ConfigProvider($this->configBuilder->reveal(), [ |
|
| 45 | 'foo' => ['name' => 'foo'], |
|
| 46 | 'bar' => ['name' => 'bar'], |
|
| 47 | ]); |
|
| 48 | $configProvider->get('baz'); |
|
| 49 | } |
|
| 50 | ||
| 51 | public function testHas(): void |
|
| 52 | { |
|
| @@ 51-59 (lines=9) @@ | ||
| 48 | $configProvider->get('baz'); |
|
| 49 | } |
|
| 50 | ||
| 51 | public function testHas(): void |
|
| 52 | { |
|
| 53 | $configProvider = new ConfigProvider($this->configBuilder->reveal(), [ |
|
| 54 | 'foo' => ['name' => 'foo'], |
|
| 55 | 'bar' => ['name' => 'bar'], |
|
| 56 | ]); |
|
| 57 | ||
| 58 | static::assertTrue($configProvider->has('foo')); |
|
| 59 | } |
|
| 60 | ||
| 61 | public function testHasNot(): void |
|
| 62 | { |
|
| @@ 61-69 (lines=9) @@ | ||
| 58 | static::assertTrue($configProvider->has('foo')); |
|
| 59 | } |
|
| 60 | ||
| 61 | public function testHasNot(): void |
|
| 62 | { |
|
| 63 | $configProvider = new ConfigProvider($this->configBuilder->reveal(), [ |
|
| 64 | 'foo' => ['name' => 'foo'], |
|
| 65 | 'bar' => ['name' => 'bar'], |
|
| 66 | ]); |
|
| 67 | ||
| 68 | static::assertFalse($configProvider->has('baz')); |
|
| 69 | } |
|
| 70 | } |
|
| 71 | ||