| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function testWhenCopyFailsItRaisesAnException() |
||
| 27 | { |
||
| 28 | $fileSystem = m::mock(FilesystemInterface::class); |
||
| 29 | $localFile = new FileNode($fileSystem, 'some/random'); |
||
| 30 | |||
| 31 | $newPath = new FileNode($fileSystem, 'some/target'); |
||
| 32 | |||
| 33 | $fileSystem->shouldReceive('copy') |
||
| 34 | ->with($localFile->getPath(), $newPath->getPath()) |
||
| 35 | ->andReturn(false); |
||
| 36 | |||
| 37 | $this->expectException(CopyFailedException::class); |
||
| 38 | |||
| 39 | $localFile->copy($newPath->getPath()); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |