Issue #3229665 by dww, alexpott, Spokje: \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTermFilterDepthTest can randomly fail due to views sorts

merge-requests/1128/head
Lee Rowlands 2021-08-25 10:00:36 +10:00
parent b0f50910d0
commit c63b2cca7d
No known key found for this signature in database
GPG Key ID: 2B829A3DF9204DC4
1 changed files with 8 additions and 0 deletions

View File

@ -70,6 +70,14 @@ class TaxonomyTermFilterDepthTest extends TaxonomyTestBase {
$this->terms[2] = $third;
$this->view = Views::getView('test_filter_taxonomy_index_tid_depth');
// Fix the created date to match the expectations of the order by in the
// view. Node 1 should be the most recent node and node 6 should be the
// oldest.
$time = \Drupal::time();
foreach ($this->nodes as $i => $node) {
$node->setCreatedTime($time->getRequestTime() - $i)->save();
}
}
/**