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

testApiCreate_ThrowsException_WhenLegueWriteThrowsException() public method

    public function testApiCreate_ThrowsException_WhenLegueWriteThrowsException()
    {
        $path = 'path';
        $contents = 'contents';
        $expected = new Exception();
        $ex = null;
        $this->expect('put', [$path, $contents])->willThrow($expected);
        try {
            $this->fs->create($path, $contents);
        } catch (Exception $ex) {
        }
        $this->assertInstanceOf(WriteException::class, $ex);
        $this->assertSame($expected, $ex->getPrevious());
    }
FilesystemTest