Example #1
0
 public function testPathInfo()
 {
     $fileItem = new FileItem($this->mock, FileItem::TYPE_POST);
     $this->assertEquals('world', $fileItem->getRelativePath());
     $this->assertEquals('2013-08-22-example.md', $fileItem->getFileName());
     $this->assertEquals('2013-08-22-example', $fileItem->getFileName(false));
     $this->assertEquals('md', $fileItem->getExtension());
 }
Example #2
0
 /**
  * Constructor
  * 
  * @param FileItem $fileItem
  * @param Yosymfony\Spress\Configuration $configuration
  */
 public function __construct(FileItem $fileItem, $configuration)
 {
     $this->fileItem = $fileItem;
     $this->extension = $fileItem->getExtension();
     $this->configuration = $configuration;
     $this->frontmatter = new Frontmatter($this->fileItem->getSourceContent(), $configuration);
     $this->setPreConverterContent($this->frontmatter->getContentNotFrontmatter());
 }