Skip to content

Commit

Permalink
Behaviour is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
tarjei committed May 10, 2024
1 parent 55bce43 commit 04b16b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Handler/UploadHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public function remove(object $obj, string $fieldName): void
if ($preEvent->isCanceled()) {
return;
}

try {
$this->storage->remove($obj, $mapping);
} catch (CannotWriteFileException $cannotWriteFileException) {
Expand Down
2 changes: 2 additions & 0 deletions tests/Storage/GaufretteStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ public function testThatRemoveMethodDoesDeleteFile(): void
*/
public function testRemoveNotFoundFile(): void
{
// the exception is cought in the UploadHandler.
$this->expectException(FileNotFound::class);
$this->mapping
->method('getUploadDestination')
->willReturn('filesystemKey');
Expand Down

0 comments on commit 04b16b4

Please sign in to comment.