| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function itShouldBuildAnApiServiceFromCache() |
||
| 22 | { |
||
| 23 | $schemaFile = 'file://fake-schema.yml'; |
||
| 24 | |||
| 25 | $schema = $this->prophesize(Schema::class); |
||
| 26 | $schema->getSchemes()->willReturn(['https']); |
||
| 27 | $schema->getHost()->willReturn('domain.tld'); |
||
| 28 | |||
| 29 | $item = $this->prophesize(CacheItemInterface::class); |
||
| 30 | $item->isHit()->shouldBeCalled()->willReturn(true); |
||
| 31 | $item->get()->shouldBeCalled()->willReturn($schema); |
||
| 32 | |||
| 33 | $cache = $this->prophesize(CacheItemPoolInterface::class); |
||
| 34 | $cache->getItem('3f470a326a5926a2e323aaadd767c0e64302a080')->willReturn($item); |
||
| 35 | |||
| 36 | ApiServiceBuilder::create() |
||
| 37 | ->withCacheProvider($cache->reveal()) |
||
| 38 | ->build($schemaFile); |
||
| 39 | } |
||
| 41 |