/**
*
*/
public function testApiAppend_ThrowsException_WhenUpdateThrowsException()
{
$path = 'path';
$write = 'write';
$read = 'read';
$expected = new Exception();
$ex = null;
$this->expect('read', [$path])->willReturn($read);
$this->expect('update', [$path, $read . $write])->willThrow($expected);
try {
$this->fs->append($path, $write);
} catch (Exception $ex) {
}
$this->assertInstanceOf(WriteException::class, $ex);
$this->assertSame($expected, $ex->getPrevious());
}