| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function testContext() |
||
| 19 | { |
||
| 20 | $host = $this->getMockBuilder(Host::class)->disableOriginalConstructor()->getMock(); |
||
| 21 | $host |
||
| 22 | ->expects($this->once()) |
||
| 23 | ->method('config') |
||
| 24 | ->willReturn($this->createMock(Configuration::class)); |
||
| 25 | |||
| 26 | $context = new Context($host); |
||
| 27 | |||
| 28 | $this->assertInstanceOf(Host::class, $context->getHost()); |
||
| 29 | $this->assertInstanceOf(Configuration::class, $context->getConfig()); |
||
| 30 | |||
| 31 | Context::push($context); |
||
| 32 | |||
| 33 | $this->assertEquals($context, Context::get()); |
||
| 34 | $this->assertEquals($context, Context::pop()); |
||
| 35 | } |
||
| 37 |