Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
10 | 1 | public function testYamlWithYamlFrontMatter() |
|
11 | { |
||
12 | 1 | $this->createPhileCore()->bootstrap(); |
|
13 | |||
14 | $raw = <<<EOF |
||
15 | 1 | --- |
|
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 | 1 | } |
|
31 | } |
||
32 |