Skip to content

Commit

Permalink
Fixed static test
Browse files Browse the repository at this point in the history
  • Loading branch information
srsathish92 committed Apr 4, 2020
1 parent d95a65a commit 981df7b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions setup/src/Magento/Setup/Test/Unit/Model/InstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ public function testInstall(array $request, array $logMessages): void
$cacheManagerMock = $this->createMock(Manager::class);
$cacheManagerMock->expects($this->any())->method('getAvailableTypes')->willReturn(['foo', 'bar']);
$cacheManagerMock->expects($this->exactly(3))->method('setEnabled')
// ->with(['foo', 'bar'], false)
->willReturn(['foo', 'bar']);
$cacheManagerMock->expects($this->exactly(3))->method('clean');
$cacheManagerMock->expects($this->exactly(3))->method('getStatus')->willReturn(['foo' => 1, 'bar' => 1]);
Expand All @@ -381,8 +380,15 @@ public function testInstall(array $request, array $logMessages): void

$registryMock = $this->createMock(Registry::class);

$this->setupFactoryMock->expects($this->atLeastOnce())->method('create')->with($resourceMock)->willReturn($setupMock);
$this->dataSetupFactoryMock->expects($this->atLeastOnce())->method('create')->willReturn($dataSetupMock);
$this->setupFactoryMock->expects($this->atLeastOnce())
->method('create')
->with($resourceMock)
->willReturn($setupMock);

$this->dataSetupFactoryMock->expects($this->atLeastOnce())
->method('create')
->willReturn($dataSetupMock);

$this->objectManager->expects($this->any())
->method('create')
->will($this->returnValueMap([
Expand Down

0 comments on commit 981df7b

Please sign in to comment.