Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 private function extractFrontMatter($file)
 {
     $contents = $this->fs->fileContents($file);
     return FrontMatter::parse($contents);
 }