| @@ 131-140 (lines=10) @@ | ||
| 128 | /** |
|
| 129 | * @test |
|
| 130 | */ |
|
| 131 | public function failing_to_delete_while_moving(): void |
|
| 132 | { |
|
| 133 | $adapter = $this->adapter(); |
|
| 134 | $adapter->write('source.txt', 'contents to be copied', new Config()); |
|
| 135 | static::$stubS3Client->failOnNextCopy(); |
|
| 136 | ||
| 137 | $this->expectException(UnableToMoveFile::class); |
|
| 138 | ||
| 139 | $adapter->move('source.txt', 'destination.txt', new Config()); |
|
| 140 | } |
|
| 141 | ||
| 142 | /** |
|
| 143 | * @test |
|
| @@ 145-153 (lines=9) @@ | ||
| 142 | /** |
|
| 143 | * @test |
|
| 144 | */ |
|
| 145 | public function failing_to_write_a_file(): void |
|
| 146 | { |
|
| 147 | $adapter = $this->adapter(); |
|
| 148 | static::$stubS3Client->throwDuringUpload(new RuntimeException('Oh no')); |
|
| 149 | ||
| 150 | $this->expectException(UnableToWriteFile::class); |
|
| 151 | ||
| 152 | $adapter->write('path.txt', 'contents', new Config()); |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| 156 | * @test |
|