From 2ae347b948a543bdcadad9d46b4ec90f1f456db8 Mon Sep 17 00:00:00 2001 From: Andrew McIntosh Date: Tue, 2 Apr 2024 16:03:14 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Update=20events=20test=20with=20err?= =?UTF-8?q?or=20details=20payload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/Resource/EventsResourceTest.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/Resource/EventsResourceTest.php b/tests/Resource/EventsResourceTest.php index b801960..eb6d443 100644 --- a/tests/Resource/EventsResourceTest.php +++ b/tests/Resource/EventsResourceTest.php @@ -71,8 +71,10 @@ public function testCreateValidationError(): void 400, [ 'errno' => 3, - 'message' => 'The request was well-formed but was unable to be followed due to semantic errors.' - . '\nevent: Value error, Unrecognized event.' + 'message' => 'The request was well-formed but was unable to be followed due to semantic errors.', + 'details' => [ + 'event: Value error, Unrecognized event.' + ] ] ); @@ -82,11 +84,11 @@ public function testCreateValidationError(): void $resource->create($this->accountId, data: []); $this->fail('FreshBooksException was not thrown'); } catch (FreshBooksException $e) { - $this->assertSame('The request was well-formed but was unable to be followed due to semantic errors.' - . '\nevent: Value error, Unrecognized event.', $e->getMessage()); + $this->assertSame('The request was well-formed but was unable to be followed due ' + . 'to semantic errors.', $e->getMessage()); $this->assertSame(400, $e->getCode()); $this->assertNull($e->getErrorCode()); - $this->assertSame([], $e->getErrorDetails()); + $this->assertSame(['event: Value error, Unrecognized event.'], $e->getErrorDetails()); } }