Merge branch '5.26' of https://github.com/civicrm/civicrm-core
authoreileen <emcnaughton@wikimedia.org>
Tue, 26 May 2020 20:12:29 +0000 (08:12 +1200)
committereileen <emcnaughton@wikimedia.org>
Tue, 26 May 2020 20:12:29 +0000 (08:12 +1200)
1  2 
Civi/Payment/PropertyBag.php
tests/phpunit/Civi/Payment/PropertyBagTest.php

Simple merge
index 4ac3992bfd32f6478cb75e00d9eea452e512c660,cc31e0427c5624cbad7ee1ace70d01f3eea4362f..4befbec00c5098dec3818db148ab167802bd7622
@@@ -80,15 -74,18 +74,27 @@@ class PropertyBagTest extends \PHPUnit\
      $this->assertEquals(123, $propertyBag['contact_id']);
    }
  
 +  /**
 +   * Test that emails set by the legacy method of 'email-5' can be retrieved with getEmail.
 +   */
 +  public function testSetBillingEmailLegacy() {
 +    $localPropertyBag = new PropertyBag();
 +    $localPropertyBag->mergeLegacyInputParams(['email-' . \CRM_Core_BAO_LocationType::getBilling() => 'a@b.com']);
 +    $this->assertEquals('a@b.com', $localPropertyBag->getEmail());
 +  }
 +
+   /**
+    * Test that null is valid for recurring contribution ID.
+    *
+    * See https://github.com/civicrm/civicrm-core/pull/17292
+    */
+   public function testRecurProcessorIDNull() {
+     $bag = new PropertyBag();
+     $bag->setRecurProcessorID(NULL);
+     $value = $bag->getRecurProcessorID();
+     $this->assertNull($value);
+   }
    /**
     */
    public function testMergeInputs() {