| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function test_can_parse_markdown_file() |
||
| 36 | { |
||
| 37 | $document = (new MarkdownFileParser(Hyde::path('_posts/test-post.md')))->get(); |
||
| 38 | $this->assertInstanceOf(MarkdownDocument::class, $document); |
||
| 39 | |||
| 40 | $this->assertEquals([ |
||
| 41 | 'title' => 'My New Post', |
||
| 42 | 'category' => 'blog', |
||
| 43 | 'author' => 'Mr. Hyde', |
||
| 44 | ], $document->matter); |
||
| 45 | |||
| 46 | $this->assertEquals( |
||
| 47 | '# My New PostThis is a post stub used in the automated tests', |
||
| 48 | str_replace(["\n", "\r"], '', $document->body) |
||
| 49 | ); |
||
| 60 |