Kraken\_Unit\Filesystem\FilesystemTest::testApiGetType_ThrowsException_WhenGetMetadataOnModelThrowsException PHP Method

testApiGetType_ThrowsException_WhenGetMetadataOnModelThrowsException() public method

    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());
    }
FilesystemTest