@@ -1794,12 +1794,8 @@ public function testUpdateDocumentsRelationships(): void
17941794 ]), onNext: function () {
17951795 throw new Exception ("Error thrown to test update doesn't stopped and error is caught " );
17961796 }, onError:function ($ e ) {
1797- if ($ e instanceof Exception) {
1798- $ this ->assertInstanceOf (Exception::class, $ e );
1799- $ this ->assertEquals ("Error thrown to test update doesn't stopped and error is caught " , $ e ->getMessage ());
1800- } else {
1801- $ this ->fail ("Caught value is not an Exception. " );
1802- }
1797+ $ this ->assertInstanceOf (Exception::class, $ e );
1798+ $ this ->assertEquals ("Error thrown to test update doesn't stopped and error is caught " , $ e ->getMessage ());
18031799 });
18041800
18051801 $ document = $ this ->getDatabase ()->findOne ('testUpdateDocumentsRelationships1 ' );
@@ -1841,25 +1837,17 @@ public function testUpdateDocumentsRelationships(): void
18411837 ]), onNext: function () {
18421838 throw new Exception ("Error thrown to test update doesn't stopped and error is caught " );
18431839 }, onError:function ($ e ) {
1844- if ($ e instanceof Exception) {
1845- $ this ->assertInstanceOf (Exception::class, $ e );
1846- $ this ->assertEquals ("Error thrown to test update doesn't stopped and error is caught " , $ e ->getMessage ());
1847- } else {
1848- $ this ->fail ("Caught value is not an Exception. " );
1849- }
1840+ $ this ->assertInstanceOf (Exception::class, $ e );
1841+ $ this ->assertEquals ("Error thrown to test update doesn't stopped and error is caught " , $ e ->getMessage ());
18501842 });
18511843
18521844 $ this ->getDatabase ()->updateDocuments ('testUpdateDocumentsRelationships2 ' , new Document ([
18531845 'testUpdateDocumentsRelationships1 ' => 'doc1 '
18541846 ]), onNext: function () {
18551847 throw new Exception ("Error thrown to test update doesn't stopped and error is caught " );
18561848 }, onError:function ($ e ) {
1857- if ($ e instanceof Exception) {
1858- $ this ->assertInstanceOf (Exception::class, $ e );
1859- $ this ->assertEquals ("Error thrown to test update doesn't stopped and error is caught " , $ e ->getMessage ());
1860- } else {
1861- $ this ->fail ("Caught value is not an Exception. " );
1862- }
1849+ $ this ->assertInstanceOf (Exception::class, $ e );
1850+ $ this ->assertEquals ("Error thrown to test update doesn't stopped and error is caught " , $ e ->getMessage ());
18631851 });
18641852
18651853 $ documents = $ this ->getDatabase ()->find ('testUpdateDocumentsRelationships2 ' );
0 commit comments