Kraken\Filesystem\FilesystemInterface::removeFile PHP Method

removeFile() public method

Remove a file.
public removeFile ( string $path )
$path string
    public function removeFile($path);

Usage Example

コード例 #1
0
 /**
  *
  */
 public function testApiRemoveFile_ThrowsException_WhenDeleteOnModelThrowsException()
 {
     $path = 'path';
     $expected = new Exception();
     $ex = null;
     $this->expect('delete', [$path])->willThrow($expected);
     try {
         $this->fs->removeFile($path);
     } catch (Exception $ex) {
     }
     $this->assertInstanceOf(WriteException::class, $ex);
     $this->assertSame($expected, $ex->getPrevious());
 }