diff --git a/search_api_db/src/Tests/BackendTest.php b/search_api_db/src/Tests/BackendTest.php index 11797ca..3f90800 100644 --- a/search_api_db/src/Tests/BackendTest.php +++ b/search_api_db/src/Tests/BackendTest.php @@ -724,7 +724,7 @@ class BackendTest extends EntityUnitTestBase { // Regression tests for #1403916. $query = $this->buildSearch('test foo'); $facets['type'] = array( - 'field' => 'type', + 'field' => $this->getFieldId('type'), 'limit' => 0, 'min_count' => 1, 'missing' => TRUE, @@ -736,7 +736,9 @@ class BackendTest extends EntityUnitTestBase { array('count' => 2, 'filter' => '"item"'), array('count' => 1, 'filter' => '"article"'), ); - $this->assertEqual($results['search_api_facets']['type'], $expected, 'Correct facets were returned'); + $facets = $results->getExtraData('search_api_facets', array())['type']; + usort($facets, array($this, 'facetCompare')); + $this->assertEqual($facets, $expected, 'Correct facets were returned'); } /**