Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | public function testCreateSchema() |
||
25 | { |
||
26 | $uri = __METHOD__; |
||
27 | $schema = (object) [__METHOD__ => __LINE__]; |
||
28 | |||
29 | $resolver = $this->getMockBuilder('JsonSchema\RefResolver') |
||
30 | ->disableOriginalConstructor() |
||
31 | ->getMock(); |
||
32 | $resolver->expects($this->once()) |
||
33 | ->method('resolve') |
||
34 | ->with($uri) |
||
35 | ->willReturn($schema); |
||
36 | |||
37 | $this->assertEquals( |
||
38 | $schema, |
||
39 | (new SchemaFactory($resolver))->createSchema($uri) |
||
40 | ); |
||
41 | } |
||
42 | } |
||
43 |