From 34aeb73a8e3840d2a659c7dc05cc55e7415c9cda Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Tue, 19 Sep 2023 17:34:44 +0100 Subject: [PATCH] test fixes --- .../phpunit/api/v4/Afform/AfformContactUsageTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/afform/mock/tests/phpunit/api/v4/Afform/AfformContactUsageTest.php b/ext/afform/mock/tests/phpunit/api/v4/Afform/AfformContactUsageTest.php index e63c67e50d..06733ad126 100644 --- a/ext/afform/mock/tests/phpunit/api/v4/Afform/AfformContactUsageTest.php +++ b/ext/afform/mock/tests/phpunit/api/v4/Afform/AfformContactUsageTest.php @@ -179,11 +179,11 @@ EOHTML; $this->assertEquals($this->formName, $submission['afform_name']); $this->assertIsInt($submission['data']['Activity1'][0]['id']); - $this->assertEquals('Individual1', $submission['data']['Activity1'][0]['subject']); + $this->assertEquals('Individual1', $submission['data']['Activity1'][0]['fields']['subject']); $this->assertIsInt($submission['data']['Individual1'][0]['id']); - $this->assertEquals($firstName, $submission['data']['Individual1'][0]['first_name']); - $this->assertEquals('site', $submission['data']['Individual1'][0]['last_name']); - $this->assertEquals('This field is set in the data array', $submission['data']['Individual1'][0]['source']); + $this->assertEquals($firstName, $submission['data']['Individual1'][0]['fields']['first_name']); + $this->assertEquals('site', $submission['data']['Individual1'][0]['fields']['last_name']); + $this->assertEquals('This field is set in the data array', $submission['data']['Individual1'][0]['fields']['source']); // Check that Activity was submitted correctly. $activity = \Civi\Api4\Activity::get(FALSE) @@ -392,7 +392,7 @@ EOHTML; ->execute()->single(); $this->assertEquals($contact['id'], $submission['data']['Individual1'][0]['id']); $this->assertEquals($contact['org.id'], $submission['data']['Organization1'][0]['id']); - $this->assertEquals('Organization1', $submission['data']['Individual1'][0]['employer_id']); + $this->assertEquals('Organization1', $submission['data']['Individual1'][0]['fields']['employer_id']); $this->assertEquals($contact['email_primary'], $submission['data']['Individual1'][0]['joins']['Email'][0]['id']); $this->assertEquals($individualEmail, $submission['data']['Individual1'][0]['joins']['Email'][0]['email']); $this->assertEquals($locationType, $submission['data']['Individual1'][0]['joins']['Email'][0]['location_type_id']); -- 2.25.1