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

Revert "Issue #3455186 by cmlara, joseph.olstad - Update change made by project update bot."

This reverts commit 1bd769e8.
parent 1bd769e8
No related branches found
No related tags found
No related merge requests found
......@@ -50,12 +50,14 @@ class CshsGroupByRootFormatterUnitTest extends UnitTestCase {
$mock
->expects($matcher)
->method('getSetting')
->willReturnCallback(function (string $param) use ($response) {
if (is_a($response, \Exception::class)) {
throw $response;
->willReturnCallback(
function (...$parameters) use ($matcher, $settings) {
$this->assertSame(\array_map(
static fn (string $name): array => [$name],
\array_keys($settings),
)[$matcher->getInvocationCount() - 1], $parameters);
}
return $response;
});
);
$terms = \array_map(function (array $lineage): array {
static $created = [];
......@@ -109,12 +111,14 @@ class CshsGroupByRootFormatterUnitTest extends UnitTestCase {
$term_storage
->expects($matcher)
->method('loadAllParents')
->willReturnCallback(function (string $param) use ($response) {
if (is_a($response, \Exception::class)) {
throw $response;
->willReturnCallback(
function (...$parameters) use ($matcher, $terms_to_view) {
$this->assertSame(\array_map(
static fn (TermInterface $term): array => [$term->id()],
$terms_to_view,
)[$matcher->getInvocationCount() - 1], $parameters);
}
return $response;
});
);
$mock
->expects(static::exactly(\count($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