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)); }
private function extractFrontMatter($file) { $contents = $this->fs->fileContents($file); return FrontMatter::parse($contents); }