Unverified Commit 4894881a authored by alexpott's avatar alexpott
Browse files

Issue #3229686 by Spokje, dww: Optimize logic in Kernel- and Functional-test...

Issue #3229686 by Spokje, dww: Optimize logic in Kernel- and Functional-test of TaxonomyTermFilterDepthTest
parent c63b2cca
......@@ -74,9 +74,9 @@ protected function setUp($import_test_views = TRUE): void {
// 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();
$request_time = \Drupal::time()->getRequestTime();
foreach ($this->nodes as $i => $node) {
$node->setCreatedTime($time->getRequestTime() - $i)->save();
$node->setCreatedTime($request_time - $i)->save();
}
}
......
......@@ -75,9 +75,9 @@ protected function setUp($import_test_views = TRUE): void {
// 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();
$request_time = \Drupal::time()->getRequestTime();
foreach ($this->nodes as $i => $node) {
$node->setCreatedTime($time->getRequestTime() - $i)->save();
$node->setCreatedTime($request_time - $i)->save();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment