Skip to content
Snippets Groups Projects
Commit b3d28f4d authored by Joseph Olstad's avatar Joseph Olstad
Browse files

Issue #3455186 by joseph.olstad - Refactor of 88f1e040 for tests for D11...

Issue #3455186 by joseph.olstad - Refactor of 88f1e040 for tests for D11 phpunit 10+ compatibility refactoring test.
parent 6571d1d2
No related branches found
No related tags found
No related merge requests found
Pipeline #333365 failed
......@@ -113,17 +113,6 @@ $terms = \array_map(function (array $lineage) {
return $terms;
}, $tree);
// Traverse the lineage from the end to set parents.
$reverse = \array_reverse($lineage);
foreach ($reverse as $name) {
$parent_item = $this->createMock(EntityReferenceFieldItemListInterface::class);
$parent_item->target_id = ($parent = \next($reverse)) ? $created[$parent]->id() : NULL;
$created[$name]->setParent($parent_item);
}
return $terms;
}, $tree);
// Set terms to view.
$terms_to_view = \array_map(static fn (array $lineage) => \end($lineage), $terms);
$mock->method('getEntitiesToView')->willReturn($terms_to_view);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment