public function testIsValid()
 {
     $content = file_get_contents(__DIR__ . '/Resources/markdown.md');
     $this->assertTrue(FrontMatter::isValid($content));
     $content = file_get_contents(__DIR__ . '/Resources/invalid.html');
     $this->assertFalse(FrontMatter::isValid($content));
 }
Beispiel #2
0
 private function extractFrontMatter($file)
 {
     $contents = $this->fs->fileContents($file);
     return FrontMatter::parse($contents);
 }