Merge pull request #16901 from eileenmcnaughton/settings
[civicrm-core.git] / tests / phpunit / api / v4 / Action / CustomValueTest.php
index 9713ee1cf8736cc15c8745219bddfbcf48d5443e..4286f618dd6a46c3b83da956fe02a693f8783df6 100644 (file)
@@ -149,19 +149,21 @@ class CustomValueTest extends BaseCustomValueTest {
       ->addValue("entity_id", $this->contactID)
       ->execute();
     // fetch custom values using API4 CustomValue::get
-    $result = CustomValue::get($group)->execute();
+    $result = CustomValue::get($group)
+      ->addOrderBy($colorField, 'DESC')
+      ->execute();
 
     // check if two custom values are created
     $this->assertEquals(2, count($result));
     $expectedResult = [
       [
-        'id' => 1,
-        $colorField => 'g',
+        'id' => 2,
+        $colorField => 'r',
         'entity_id' => $this->contactID,
       ],
       [
-        'id' => 2,
-        $colorField => 'r',
+        'id' => 1,
+        $colorField => 'g',
         'entity_id' => $this->contactID,
       ],
     ];