diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php index 282b7ab..df616bb 100644 --- a/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php +++ b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php @@ -128,9 +128,11 @@ function testSearchingMultilingualFieldValues() { // This should find two results for the second and third node. $plugin->setSearch('English OR Hungarian', array(), array()); $search_result = $plugin->execute(); + $this->assertEqual(count($search_result), 2, 'Found two results.'); - $this->assertEqual($search_result[0]['title'], 'Third node this is the Hungarian title', 'The search finds the correct Hungarian title.'); - $this->assertEqual($search_result[1]['title'], 'Second node this is the English title', 'The search finds the correct English title.'); + $results = array($search_result[0]['title'], $search_result[1]['title']); + $this->assertEqual(in_array('Third node this is the Hungarian title', $results), 'The search finds the correct Hungarian title.'); + $this->assertEqual(in_array('Second node this is the English title', $results), 'The search finds the correct English title.'); // Now filter for Hungarian results only. $plugin->setSearch('English OR Hungarian', array('f' => array('langcode:hu')), array());