WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 months ago

#26345 closed defect (bug) (fixed)

Failure in Tests_Post_Query::test_meta_query_decimal_results()

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Milestone: 3.8 Priority: normal
Severity: normal Version:
Component: Unit Tests Keywords:
Focuses: Cc:

Description

The test sometimes fails due to different order of items in the array:

1) Tests_Post_Query::test_meta_query_decimal_results
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
-    0 => 3
-    1 => 4
-    2 => 5
+    0 => 5
+    1 => 3
+    2 => 4
 )

Since we don't specify an order there, assertEqualSets() should be used instead of direct array comparison.

Change History (1)

comment:1 SergeyBiryukov5 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 26490:

Use assertEqualSets() instead of direct array comparison.

fixes #26345

Note: See TracTickets for help on using tickets.