| Total Complexity | 4 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class Sf2YamlTest extends TestCase |
||
| 17 | { |
||
| 18 | public function testCreation() |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param Sf2Yaml $parser |
||
| 29 | * @depends testCreation |
||
| 30 | */ |
||
| 31 | public function testParsing(Sf2Yaml $parser) |
||
| 32 | { |
||
| 33 | $tester = new YamlTester($this, $parser); |
||
| 34 | |||
| 35 | $tester->assertParser(); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @depends testCreation |
||
| 40 | * |
||
| 41 | * @param Sf2Yaml $parser |
||
| 42 | * @covers \Ktomk\Pipelines\Yaml\Sf2Yaml::parseFile |
||
| 43 | */ |
||
| 44 | public function testParseFile(Sf2Yaml $parser) |
||
| 45 | { |
||
| 46 | $path = __DIR__ . '/../../../bitbucket-pipelines.yml'; |
||
| 47 | |||
| 48 | $struct = $parser->parseFile($path); |
||
| 49 | |||
| 50 | self::assertIsArray($struct); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Symfony YAML based YAML parser needs to return NULL on |
||
| 55 | * invalid yaml file which it does not so needs patching |
||
| 56 | * tested for. |
||
| 57 | * |
||
| 58 | * @depends testCreation |
||
| 59 | * |
||
| 60 | * @param Sf2Yaml $parser |
||
| 61 | * @covers \Ktomk\Pipelines\Yaml\Sf2Yaml::parseBuffer |
||
| 62 | */ |
||
| 63 | public function testParseFileError(Sf2Yaml $parser) |
||
| 70 | } |
||
| 71 | } |
||
| 72 |