예제 #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));
 }
예제 #2
0
파일: Confgen.php 프로젝트: clue/confgen
 private function extractFrontMatter($file)
 {
     $contents = $this->fs->fileContents($file);
     return FrontMatter::parse($contents);
 }