X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fapi%2Fv3%2FJobTestCustomDataTest.php;h=07e783507e821fc5db44e25aa8df041f3d386013;hb=b3946186fade03515c3a6f1e808e22d8acc0826e;hp=2ab1dc37dd2804356ea065d9c077fcb1897b635a;hpb=49f7295641be4fa61020ac195011b533bd57f949;p=civicrm-core.git diff --git a/tests/phpunit/api/v3/JobTestCustomDataTest.php b/tests/phpunit/api/v3/JobTestCustomDataTest.php index 2ab1dc37dd..07e783507e 100644 --- a/tests/phpunit/api/v3/JobTestCustomDataTest.php +++ b/tests/phpunit/api/v3/JobTestCustomDataTest.php @@ -108,6 +108,8 @@ class api_v3_JobTestCustomDataTest extends CiviUnitTestCase { /** * Cleanup after tests. + * + * @throws \CRM_Core_Exception */ public function tearDown() { $this->quickCleanup(['civicrm_contact'], TRUE); @@ -129,6 +131,10 @@ class api_v3_JobTestCustomDataTest extends CiviUnitTestCase { * 4) NULL (ie not set) * - in safe mode NULL is not a conflict with any option but the other * combos are a conflict. + * + * @param array $dataSet + * + * @throws \CRM_Core_Exception */ public function testBatchMergeCheckboxCustomFieldHandling($dataSet) { $customFieldLabel = 'custom_' . $this->customStringCheckboxID; @@ -137,8 +143,8 @@ class api_v3_JobTestCustomDataTest extends CiviUnitTestCase { $contactID = $this->individualCreate($contact1Params); $this->individualCreate($contact2Params); $result = $this->callAPISuccess('Job', 'process_batch_merge', ['mode' => $dataSet['mode']]); - $this->assertEquals($dataSet['merged'], count($result['values']['merged'])); - $this->assertEquals($dataSet['skipped'], count($result['values']['skipped'])); + $this->assertCount($dataSet['merged'], $result['values']['merged']); + $this->assertCount($dataSet['skipped'], $result['values']['skipped']); $contact = $this->callAPISuccess('Contact', 'getsingle', ['id' => $contactID, 'return' => $customFieldLabel]); $this->assertEquals($dataSet['expected'], $contact[$customFieldLabel]); }