Kraken\Filesystem\FilesystemInterface::copyFile PHP Method

copyFile() public method

Copy a file.
public copyFile ( string $source, string $destination )
$source string
$destination string
    public function copyFile($source, $destination);

Usage Example

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