From 61296745e688b8c4c4ef549ee2fce9b1367fff92 Mon Sep 17 00:00:00 2001 From: Rich Lott / Artful Robot Date: Tue, 10 Mar 2020 12:06:23 +0000 Subject: [PATCH] add failing test --- tests/phpunit/Civi/Payment/PropertyBagTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/Civi/Payment/PropertyBagTest.php b/tests/phpunit/Civi/Payment/PropertyBagTest.php index 770c296fad..e058325366 100644 --- a/tests/phpunit/Civi/Payment/PropertyBagTest.php +++ b/tests/phpunit/Civi/Payment/PropertyBagTest.php @@ -198,6 +198,9 @@ class PropertyBagTest extends \PHPUnit\Framework\TestCase implements HeadlessInt $propertyBag = new PropertyBag(); $propertyBag->setContactID(123); $this->assertEquals(123, \CRM_Utils_Array::value('contact_id', $propertyBag)); + + // Test that using utils array value to get a nonexistent property returns the default. + $this->assertEquals(456, \CRM_Utils_Array::value('ISawAManWhoWasntThere', $propertyBag, 456)); } /** -- 2.25.1