diff --git a/app/Traits/SupportsDeleteWhereIDsNotIn.php b/app/Traits/SupportsDeleteWhereIDsNotIn.php index 4819594c..0213ebfb 100644 --- a/app/Traits/SupportsDeleteWhereIDsNotIn.php +++ b/app/Traits/SupportsDeleteWhereIDsNotIn.php @@ -56,6 +56,7 @@ trait SupportsDeleteWhereIDsNotIn public static function deleteByChunk(array $ids, $key = 'id', $chunkSize = 65535) { DB::beginTransaction(); + try { foreach (array_chunk($ids, $chunkSize) as $chunk) { static::whereIn($key, $chunk)->delete(); diff --git a/tests/Unit/LastfmTest.php b/tests/Unit/LastfmTest.php index 884f9f79..8dd5bc70 100644 --- a/tests/Unit/LastfmTest.php +++ b/tests/Unit/LastfmTest.php @@ -137,7 +137,7 @@ class LastfmTest extends TestCase $album = factory(Album::class)->create(); // When I request the service for the album's info - $client = m::mock(Client::class, [ + $client = m::mock(Client::class, [ 'get' => new Response(400, [], file_get_contents(__DIR__.'../../blobs/lastfm/album-notfound.xml')), ]);