Merge pull request #18393 from eileenmcnaughton/just_load
authorSeamus Lee <seamuslee001@gmail.com>
Thu, 10 Sep 2020 01:02:21 +0000 (11:02 +1000)
committerGitHub <noreply@github.com>
Thu, 10 Sep 2020 01:02:21 +0000 (11:02 +1000)
Remove error handling from loadObjects

1  2 
CRM/Contribute/BAO/Contribution.php
tests/phpunit/CRM/Core/Payment/BaseIPNTest.php

Simple merge
index d2d777f9faf3e7fe2177043e85d17fc67519b653,f56f11cf56b9e3b4f023c2b71241ef13c99455d1..4b4da2c8de1a5cf4c9bc578385155c0181114c5b
@@@ -145,11 -145,11 +145,11 @@@ class CRM_Core_Payment_BaseIPNTest exte
      $contribution->find(TRUE);
      $contribution->loadRelatedObjects($this->input, $this->ids, TRUE);
      $this->assertNotEmpty($contribution->_relatedObjects['membership']);
 -    $this->assertArrayHasKey($this->_membershipTypeID, $contribution->_relatedObjects['membership']);
 -    $this->assertTrue(is_a($contribution->_relatedObjects['membership'][$this->_membershipTypeID], 'CRM_Member_BAO_Membership'));
 +    $this->assertArrayHasKey($this->_membershipId . '_' . $this->_membershipTypeID, $contribution->_relatedObjects['membership']);
 +    $this->assertTrue(is_a($contribution->_relatedObjects['membership'][$this->_membershipId . '_' . $this->_membershipTypeID], 'CRM_Member_BAO_Membership'));
      $this->assertTrue(is_a($contribution->_relatedObjects['financialType'], 'CRM_Financial_BAO_FinancialType'));
-     $this->assertFalse(empty($contribution->_relatedObjects['contributionRecur']));
-     $this->assertFalse(empty($contribution->_relatedObjects['paymentProcessor']));
+     $this->assertNotEmpty($contribution->_relatedObjects['contributionRecur']);
+     $this->assertNotEmpty($contribution->_relatedObjects['paymentProcessor']);
    }
  
    /**