Skip to content

Commit f6152ed

Browse files
authored
Implement command loader
Fix test failures
1 parent 428a5b2 commit f6152ed

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/internal/Magento/Framework/App/Test/Unit/Console/CommandLoader/AggregateTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,16 @@ public function testGet(?Command $firstCmd, ?Command $secondCmd): void
7171
{
7272
$firstHas = (bool)$firstCmd;
7373
$secondHas = (bool)$secondCmd;
74+
7475
$this->firstMockCommandLoader->method('has')->with('foo')->willReturn($firstHas);
75-
$this->firstMockCommandLoader->method('get')->with('foo')->willReturn($firstCmd);
76+
if ($firstHas) {
77+
$this->firstMockCommandLoader->method('get')->with('foo')->willReturn($firstCmd);
78+
}
79+
7680
$this->secondMockCommandLoader->method('has')->with('foo')->willReturn($secondHas);
77-
$this->secondMockCommandLoader->method('get')->with('foo')->willReturn($secondCmd);
81+
if ($secondHas) {
82+
$this->secondMockCommandLoader->method('get')->with('foo')->willReturn($secondCmd);
83+
}
7884

7985
$this->assertInstanceOf(Command::class, $this->aggregateCommandLoader->get('foo'));
8086
}

0 commit comments

Comments
 (0)