[REF][PHP8.2] Declare dynamic property in two SMS tests
authorBradley Taylor <hello@brad-taylor.co.uk>
Sun, 5 Feb 2023 12:20:38 +0000 (12:20 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sun, 5 Feb 2023 12:20:38 +0000 (12:20 +0000)
tests/phpunit/CRM/SMS/BAO/ProviderTest.php
tests/phpunit/CRM/SMS/PreviewTest.php

index 9ca1c3421742959f1a51782462b25de0cb5a1382..699049b02e9140c184fff4199a32c3e74de7f82e 100644 (file)
  */
 class CRM_SMS_BAO_ProviderTest extends CiviUnitTestCase {
 
+  /**
+   * Reference to option value in sms_provider_name group.
+   *
+   * @var int
+   */
+  private $optionValueID;
+
   /**
    * Set Up Funtion
    */
   public function setUp(): void {
     parent::setUp();
     $option = $this->callAPISuccess('option_value', 'create', ['option_group_id' => 'sms_provider_name', 'name' => 'test_provider_name', 'label' => 'test_provider_name', 'value' => 1]);
-    $this->option_value = $option['id'];
+    $this->optionValueID = $option['id'];
   }
 
   /**
@@ -32,7 +39,7 @@ class CRM_SMS_BAO_ProviderTest extends CiviUnitTestCase {
    */
   public function tearDown(): void {
     parent::tearDown();
-    $this->callAPISuccess('option_value', 'delete', ['id' => $this->option_value]);
+    $this->callAPISuccess('option_value', 'delete', ['id' => $this->optionValueID]);
   }
 
   /**
index c3dd21950f48dbb4427d319f9414f89fbff65b98..c44072c1bdb98ebaaab7c054f08f6293c97bb047 100644 (file)
@@ -7,13 +7,20 @@
  */
 class CRM_SMS_PreviewTest extends CiviUnitTestCase {
 
+  /**
+   * Reference to option value in sms_provider_name group.
+   *
+   * @var int
+   */
+  private $optionValueID;
+
   /**
    * Set Up Function
    */
   public function setUp(): void {
     parent::setUp();
     $option = $this->callAPISuccess('option_value', 'create', ['option_group_id' => 'sms_provider_name', 'name' => 'test_provider_name', 'label' => 'Test Provider Label', 'value' => 1]);
-    $this->option_value = $option['id'];
+    $this->optionValueID = $option['id'];
   }
 
   /**
@@ -21,7 +28,7 @@ class CRM_SMS_PreviewTest extends CiviUnitTestCase {
    */
   public function tearDown(): void {
     parent::tearDown();
-    $this->callAPISuccess('option_value', 'delete', ['id' => $this->option_value]);
+    $this->callAPISuccess('option_value', 'delete', ['id' => $this->optionValueID]);
   }
 
   /**