| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function loading_definitions_from_yaml() |
||
| 14 | { |
||
| 15 | $loader = new YamlDefinitionLoader(); |
||
| 16 | $this->assertTrue($loader->canLoad('a_yaml_file.yaml')); |
||
| 17 | $this->assertTrue($loader->canLoad('a_yaml_file.yml')); |
||
| 18 | $this->assertFalse($loader->canLoad('not_a_yaml_file.php')); |
||
| 19 | $definitionGroup = $loader->load(__DIR__.'/Fixtures/exampleDefinition.yaml'); |
||
| 20 | $dumper = new CodeDumper(); |
||
| 21 | $code = $dumper->dump($definitionGroup); |
||
| 22 | file_put_contents(__DIR__.'/Fixtures/definedWithYamlFixture.php', $code); |
||
| 23 | $expected = file_get_contents(__DIR__.'/Fixtures/definedWithYamlFixture.php'); |
||
| 24 | $this->assertEquals($expected, $code); |
||
| 25 | } |
||
| 26 | } |