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));
 }
示例#2
0
文件: Confgen.php 项目: clue/confgen
 private function extractFrontMatter($file)
 {
     $contents = $this->fs->fileContents($file);
     return FrontMatter::parse($contents);
 }