CRM-13234 ensure original params are tested
authorEileen <eileen@fuzion.co.nz>
Fri, 13 Sep 2013 10:06:05 +0000 (10:06 +0000)
committerEileen <eileen@fuzion.co.nz>
Fri, 13 Sep 2013 10:06:05 +0000 (10:06 +0000)
tests/phpunit/api/v3/ProfileTest.php

index af9e9b6436e5536203624dffb860bdb20d8ee0ef..288c97cbdbdd643e6f7f3dc465884e5c8673eb35 100644 (file)
@@ -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']);
   }
 
   /**