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