Replace property with variable in OrderTest
authorBradley Taylor <hello@brad-taylor.co.uk>
Mon, 29 May 2023 15:06:53 +0000 (16:06 +0100)
committerBradley Taylor <hello@brad-taylor.co.uk>
Mon, 29 May 2023 15:06:53 +0000 (16:06 +0100)
tests/phpunit/api/v3/OrderTest.php

index 971cea59d82f207a3f983785ad311e1f038ca1a6..e6751dc8249494883c5d680b770e4d00385773a6 100644 (file)
@@ -513,7 +513,7 @@ class api_v3_OrderTest extends CiviUnitTestCase {
    */
   public function testAddOrderForParticipant(): void {
     $event = $this->eventCreate();
-    $this->_eventId = $event['id'];
+    $eventId = $event['id'];
     $p = [
       'contact_id' => $this->_individualId,
       'receive_date' => '2010-01-20',
@@ -538,7 +538,7 @@ class api_v3_OrderTest extends CiviUnitTestCase {
       'line_item' => $lineItems,
       'params' => [
         'contact_id' => $this->_individualId,
-        'event_id' => $this->_eventId,
+        'event_id' => $eventId,
         'role_id' => 1,
         'register_date' => '2007-07-21 00:00:00',
         'source' => 'Online Event Registration: API Testing',
@@ -578,7 +578,7 @@ class api_v3_OrderTest extends CiviUnitTestCase {
       'line_item' => $lineItems,
       'params' => [
         'contact_id' => $this->individualCreate(),
-        'event_id' => $this->_eventId,
+        'event_id' => $eventId,
         'role_id' => 1,
         'register_date' => '2007-07-21 00:00:00',
         'source' => 'Online Event Registration: API Testing',