| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 10 | 1 | public function testYamlWithYamlFrontMatter() |
|
| 11 | { |
||
| 12 | 1 | $this->createPhileCore()->bootstrap(); |
|
| 13 | |||
| 14 | 1 | $raw = <<<EOF |
|
| 15 | --- |
||
| 16 | Title: foo |
||
| 17 | Tags: [bar, baz] |
||
| 18 | --- |
||
| 19 | |||
| 20 | Page Content |
||
| 21 | EOF; |
||
| 22 | |||
| 23 | 1 | $parser = new Meta([ |
|
| 24 | 1 | 'fences' => ['yaml' => ['open' => '---', 'close' => '---']], |
|
| 25 | 'format' => 'YAML' |
||
| 26 | ]); |
||
| 27 | 1 | $meta = $parser->parse($raw); |
|
| 28 | 1 | $this->assertSame('foo', $meta['title']); |
|
| 29 | 1 | $this->assertSame(['bar', 'baz'], $meta['tags']); |
|
| 30 | } |
||
| 46 |