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