$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() {