1 | <?php |
||
18 | class LoaderTest extends \PHPUnit_Framework_TestCase |
||
19 | { |
||
20 | /** |
||
21 | * @test |
||
22 | * @expectedException \KleijnWeb\SwaggerBundle\Document\Exception\ResourceNotReadableException |
||
23 | */ |
||
24 | public function willFailWhenFileDoesNotExist() |
||
29 | |||
30 | /** |
||
31 | * @test |
||
32 | * @expectedException \KleijnWeb\SwaggerBundle\Document\Exception\ResourceNotDecodableException |
||
33 | */ |
||
34 | public function willFailWhenYamlIsNotDecodable() |
||
45 | |||
46 | /** |
||
47 | * @test |
||
48 | */ |
||
49 | public function canLoadValidYaml() |
||
57 | |||
58 | /** |
||
59 | * @test |
||
60 | * @expectedException \KleijnWeb\SwaggerBundle\Document\Exception\ResourceNotDecodableException |
||
61 | */ |
||
62 | public function willFailWhenJsonIsNotDecodable() |
||
66 | |||
67 | /** |
||
68 | * @test |
||
69 | */ |
||
70 | public function canLoadValidJson() |
||
74 | |||
75 | /** |
||
76 | * @test |
||
77 | * @expectedException \KleijnWeb\SwaggerBundle\Document\Exception\ResourceNotDecodableException |
||
78 | */ |
||
79 | public function willFailWhenContentIsNeitherYamlNorJson() |
||
83 | |||
84 | /** |
||
85 | * @param string $path |
||
86 | * @param string $content |
||
87 | * |
||
88 | * @return \stdClass |
||
89 | * @throws \KleijnWeb\SwaggerBundle\Document\Exception\ResourceNotDecodableException |
||
90 | * @throws \KleijnWeb\SwaggerBundle\Document\Exception\ResourceNotReadableException |
||
91 | * @throws \org\bovigo\vfs\vfsStreamException |
||
92 | */ |
||
93 | private function loadContentViaVfs($path, $content) |
||
112 | } |
||
113 |