@@ -3970,12 +3970,8 @@ public function testDeleteBulkDocuments(): void
39703970 }
39713971 );
39723972 } catch (Exception $ e ) {
3973- if ($ e instanceof Exception) {
3974- $ this ->assertInstanceOf (Exception::class, $ e );
3975- $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
3976- } else {
3977- $ this ->fail ("Caught value is not an Exception. " );
3978- }
3973+ $ this ->assertInstanceOf (Exception::class, $ e );
3974+ $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
39793975 }
39803976
39813977 $ count = $ database ->deleteDocuments (
@@ -3993,12 +3989,8 @@ public function testDeleteBulkDocuments(): void
39933989 throw new Exception ("Error thrown to test that deletion doesn't stop and error is caught " );
39943990 },
39953991 onError:function ($ e ) {
3996- if ($ e instanceof Exception) {
3997- $ this ->assertInstanceOf (Exception::class, $ e );
3998- $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
3999- } else {
4000- $ this ->fail ("Caught value is not an Exception. " );
4001- }
3992+ $ this ->assertInstanceOf (Exception::class, $ e );
3993+ $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
40023994 }
40033995 );
40043996
@@ -4008,12 +4000,8 @@ public function testDeleteBulkDocuments(): void
40084000 $ this ->assertEquals (8 , $ database ->deleteDocuments ('bulk_delete ' , onNext: function () {
40094001 throw new Exception ("Error thrown to test that deletion doesn't stop and error is caught " );
40104002 }, onError:function ($ e ) {
4011- if ($ e instanceof Exception) {
4012- $ this ->assertInstanceOf (Exception::class, $ e );
4013- $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
4014- } else {
4015- $ this ->fail ("Caught value is not an Exception. " );
4016- }
4003+ $ this ->assertInstanceOf (Exception::class, $ e );
4004+ $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
40174005 }));
40184006
40194007 $ docs = $ database ->find ('bulk_delete ' );
@@ -4029,12 +4017,8 @@ public function testDeleteBulkDocuments(): void
40294017 $ results [] = $ doc ;
40304018 throw new Exception ("Error thrown to test that deletion doesn't stop and error is caught " );
40314019 }, onError:function ($ e ) {
4032- if ($ e instanceof Exception) {
4033- $ this ->assertInstanceOf (Exception::class, $ e );
4034- $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
4035- } else {
4036- $ this ->fail ("Caught value is not an Exception. " );
4037- }
4020+ $ this ->assertInstanceOf (Exception::class, $ e );
4021+ $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
40384022 });
40394023
40404024 $ this ->assertEquals (5 , $ count );
@@ -4107,12 +4091,8 @@ public function testDeleteBulkDocuments(): void
41074091 $ database ->deleteDocuments ('bulk_delete ' , onNext: function () {
41084092 throw new Exception ("Error thrown to test that deletion doesn't stop and error is caught " );
41094093 }, onError:function ($ e ) {
4110- if ($ e instanceof Exception) {
4111- $ this ->assertInstanceOf (Exception::class, $ e );
4112- $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
4113- } else {
4114- $ this ->fail ("Caught value is not an Exception. " );
4115- }
4094+ $ this ->assertInstanceOf (Exception::class, $ e );
4095+ $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
41164096 });
41174097
41184098 $ this ->assertEquals (0 , \count ($ this ->getDatabase ()->find ('bulk_delete ' )));
@@ -4161,24 +4141,16 @@ public function testDeleteBulkDocumentsQueries(): void
41614141 $ this ->assertEquals (5 , $ database ->deleteDocuments ('bulk_delete_queries ' , [Query::limit (5 )], onNext: function () {
41624142 throw new Exception ("Error thrown to test that deletion doesn't stop and error is caught " );
41634143 }, onError:function ($ e ) {
4164- if ($ e instanceof Exception) {
4165- $ this ->assertInstanceOf (Exception::class, $ e );
4166- $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
4167- } else {
4168- $ this ->fail ("Caught value is not an Exception. " );
4169- }
4144+ $ this ->assertInstanceOf (Exception::class, $ e );
4145+ $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
41704146 }));
41714147 $ this ->assertEquals (5 , \count ($ database ->find ('bulk_delete_queries ' )));
41724148
41734149 $ this ->assertEquals (5 , $ database ->deleteDocuments ('bulk_delete_queries ' , [Query::limit (5 )], onNext: function () {
41744150 throw new Exception ("Error thrown to test that deletion doesn't stop and error is caught " );
41754151 }, onError:function ($ e ) {
4176- if ($ e instanceof Exception) {
4177- $ this ->assertInstanceOf (Exception::class, $ e );
4178- $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
4179- } else {
4180- $ this ->fail ("Caught value is not an Exception. " );
4181- }
4152+ $ this ->assertInstanceOf (Exception::class, $ e );
4153+ $ this ->assertEquals ("Error thrown to test that deletion doesn't stop and error is caught " , $ e ->getMessage ());
41824154 }));
41834155 $ this ->assertEquals (0 , \count ($ database ->find ('bulk_delete_queries ' )));
41844156
0 commit comments