From 906842f081a8d7d980a0f0f000fb5c0946a01b7b Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sun, 18 Aug 2019 08:56:18 +1000 Subject: [PATCH] Add in unit test demonstrating that fee label changes when the price field value label changes --- tests/phpunit/api/v3/ParticipantTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/api/v3/ParticipantTest.php b/tests/phpunit/api/v3/ParticipantTest.php index b5654e1cd2..b3d76fbf38 100644 --- a/tests/phpunit/api/v3/ParticipantTest.php +++ b/tests/phpunit/api/v3/ParticipantTest.php @@ -573,6 +573,9 @@ class api_v3_ParticipantTest extends CiviUnitTestCase { $this->assertEquals(2, $lineItem['qty']); $this->assertEquals(20, $lineItem['unit_price']); $this->assertEquals('pricefieldvalue1', $lineItem['label']); + $this->callAPISuccess('PriceFieldValue', 'create', ['id' => $pfv2['id'], 'label' => 'Price FIeld Value 2 Label']); + $participantGet = $this->callAPISuccess('Participant', 'get', ['id' => $participant['id']]); + $this->assertEquals(["pricefieldvalue1 - 2", "pricefieldvalue2 - 2"], $participantGet['values'][$participant['id']]['participant_fee_level']); // Cleanup $this->callAPISuccess('participant', 'delete', ['id' => $participant['id']]); -- 2.25.1