示例#1
0
 public function testGetPreviewType()
 {
     $helper = new File($this->container);
     $this->assertEquals('text', $helper->getPreviewType('test.txt'));
     $this->assertEquals('markdown', $helper->getPreviewType('test.markdown'));
     $this->assertEquals('md', $helper->getPreviewType('test.md'));
     $this->assertEquals(null, $helper->getPreviewType('test.doc'));
 }
示例#2
0
 public function testIcon()
 {
     $h = new File($this->container);
     $this->assertEquals('fa-file-image-o', $h->icon('test.png'));
     $this->assertEquals('fa-file-o', $h->icon('test'));
 }