From: Eileen Date: Fri, 13 Sep 2013 10:06:05 +0000 (+0000) Subject: CRM-13234 ensure original params are tested X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f5bf5e4f50823a38076fed798d52585d6366a227;p=civicrm-core.git CRM-13234 ensure original params are tested --- diff --git a/tests/phpunit/api/v3/ProfileTest.php b/tests/phpunit/api/v3/ProfileTest.php index af9e9b6436..288c97cbdb 100644 --- a/tests/phpunit/api/v3/ProfileTest.php +++ b/tests/phpunit/api/v3/ProfileTest.php @@ -431,17 +431,14 @@ class api_v3_ProfileTest extends CiviUnitTestCase { $profileDetails = $this->callAPISuccess('profile', 'get', $getParams); foreach ($updateParams as $profileField => $value) { - $this->assertEquals($value, CRM_Utils_Array::value($profileField, $profileDetails['values']), "In line " . __LINE__ . " error message: " . "missing/mismatching value for {$profileField}" + $this->assertEquals($value, CRM_Utils_Array::value($profileField, $profileDetails['values']), "missing/mismatching value for {$profileField}" ); } - unset($updateParams['email-primary']); - $updateParams['email-Primary'] = 'my@mail.com'; + unset($params['email-primary']); + $params['email-Primary'] = 'my@mail.com'; $this->callAPISuccess('profile', 'submit', $params); $profileDetails = $this->callAPISuccess('profile', 'get', $getParams); - foreach ($updateParams as $profileField => $value) { - $this->assertEquals($value, CRM_Utils_Array::value($profileField, $profileDetails['values']), "In line " . __LINE__ . " error message: " . "missing/mismatching value for {$profileField}" - ); - } + $this->assertEquals('my@mail.com', $profileDetails['values']['email-Primary']); } /**