Kraken\Filesystem\FilesystemInterface::getType PHP Method

getType() public method

Get type of a file.
public getType ( string $path ) : string
$path string
return string
    public function getType($path);

Usage Example

Esempio n. 1
0
 /**
  *
  */
 public function testApiGetType_ThrowsException_WhenGetMetadataOnModelThrowsException()
 {
     $path = 'path';
     $expected = new Exception();
     $ex = null;
     $this->expect('getMetadata', [$path])->willThrow($expected);
     try {
         $this->fs->getType($path);
     } catch (Exception $ex) {
     }
     $this->assertInstanceOf(ReadException::class, $ex);
     $this->assertSame($expected, $ex->getPrevious());
 }