|
@@ 84-93 (lines=10) @@
|
| 81 |
|
static::assertFalse($fromFile->exists()); |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
public function testCopyWhenOriginalFileDoesNotExistThrowsAnException() |
| 85 |
|
{ |
| 86 |
|
$fromFile = new LocalFile(static::$dir . 'fail_from.text'); |
| 87 |
|
|
| 88 |
|
$toFile = new LocalFile(static::$dir . 'fail_to.text'); |
| 89 |
|
|
| 90 |
|
$this->expectException(FileNotFoundException::class); |
| 91 |
|
|
| 92 |
|
$this->transfer->copyTo($fromFile, $toFile); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
public function testMoveWhenOriginalFileDoesNotExistThrowsAnException() |
| 96 |
|
{ |
|
@@ 95-104 (lines=10) @@
|
| 92 |
|
$this->transfer->copyTo($fromFile, $toFile); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
public function testMoveWhenOriginalFileDoesNotExistThrowsAnException() |
| 96 |
|
{ |
| 97 |
|
$fromFile = new LocalFile(static::$dir . 'fail_move_from.text'); |
| 98 |
|
|
| 99 |
|
$toFile = new LocalFile(static::$dir . 'fail_move_to.text'); |
| 100 |
|
|
| 101 |
|
$this->expectException(FileNotFoundException::class); |
| 102 |
|
|
| 103 |
|
$this->transfer->moveTo($fromFile, $toFile); |
| 104 |
|
} |
| 105 |
|
|
| 106 |
|
public function testCopyWhenFilesystemDoesNotReadStreamThrowsAnException() |
| 107 |
|
{ |