Author: Victor Puertas (vpgugr@gmail.com)
Inheritance: extends SplFileInfo
Esempio n. 1
0
 public function testHasPredefinedExtension()
 {
     $fileInfo = new FileInfo('2016-02-02-spress-2.1.1-released.md', $this->predefinedExtensions);
     $this->assertTrue($fileInfo->hasPredefinedExtension());
     $fileInfo = new FileInfo('2016-02-02-spress-2.1.1-released.acme', $this->predefinedExtensions);
     $this->assertFalse($fileInfo->hasPredefinedExtension());
 }
Esempio n. 2
0
 private function isBinary(SplFileInfo $file)
 {
     $fileInfo = new FileInfo($file->getPathname(), $this->params['text_extensions']);
     return false === $fileInfo->hasPredefinedExtension();
 }