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

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

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