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

Issue #3455186 by cmlara, joseph.olstad - Replace withConsecutive and...

Issue #3455186 by cmlara, joseph.olstad - Replace withConsecutive and willReturnOnConsecutiveCalls - adjustments.
parent 558dbf87
No related branches found
No related tags found
No related merge requests found
Pipeline #322486 failed
......@@ -45,14 +45,14 @@ class CshsGroupByRootFormatterUnitTest extends UnitTestCase {
'getTranslationFromContext',
])
->getMock();
foreach (\array_keys($settings) as $i => $key) {
$mock->expects(static::exactly($i))
$mock->expects(static::exactly(1))
->method('getSetting')
->with($key)
->willReturn($settings[$key]);
}
$terms = \array_map(function (array $lineage): array {
static $created = [];
$terms = [];
......@@ -102,13 +102,12 @@ class CshsGroupByRootFormatterUnitTest extends UnitTestCase {
$term_storage = $this->createMock(TermStorageInterface::class);
foreach ($terms_to_view as $i => $term) {
$term_storage->expects(static::once($i))
->method('loadAllParents')
->with($term->id())
->willReturn(\array_reverse($terms[$i]));
$term_storage->expects(static::exactly(1))
->method('loadAllParents')
->with($term->id())
->willReturn(\array_reverse($terms[$i]));
}
$mock
->expects(static::exactly(\count($terms_to_view)))
->method('getTermStorage')
......
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