Skip to content

Commit 9521e87

Browse files
alzotao-iegorov
authored andcommitted
ACP2E-1958: avoid reloading configs for each requested key; added unit tests
1 parent f0d1035 commit 9521e87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/Magento/Framework/Module/Test/Unit/ModuleListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function testIsModuleInfoAvailableNoConfig(): void
129129
{
130130
$this->config
131131
->method('get')
132-
->willReturnOnConsecutiveCalls(['modules' => 'testModule'], null);
132+
->willReturnOnConsecutiveCalls(null);
133133
$this->assertFalse($this->model->isModuleInfoAvailable());
134134
}
135135

@@ -144,7 +144,7 @@ public function testIsModuleInfoAvailableNoConfig(): void
144144
private function setLoadConfigExpectation($isExpected = true): void
145145
{
146146
if ($isExpected) {
147-
$this->config->expects($this->exactly(2))->method('get')->willReturn(self::$enabledFixture);
147+
$this->config->expects($this->once())->method('get')->willReturn(self::$enabledFixture);
148148
} else {
149149
$this->config->expects($this->never())->method('get');
150150
}

0 commit comments

Comments
 (0)