Skip to content

Commit cd91e89

Browse files
authored
Fix unit tests
1 parent cf3d8f1 commit cd91e89

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/internal/Magento/Framework/Setup/Test/Unit/Patch/PatchApplierTest.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,20 +166,17 @@ public function testApplyDataPatchForNewlyInstalledModule($moduleName, $dataPatc
166166
\OtherDataPatch::class
167167
];
168168
$patchRegistryMock = $this->createAggregateIteratorMock(PatchRegistry::class, $patches, ['registerPatch']);
169-
$patchRegistryMock->expects($this->exactly(2))
170-
->method('registerPatch');
169+
$patchRegistryMock->expects($this->exactly(2))->method('registerPatch');
171170

172-
$this->patchRegistryFactoryMock->expects($this->any())
173-
->method('create')
174-
->willReturn($patchRegistryMock);
171+
$this->patchRegistryFactoryMock->expects($this->any())->method('create')->willReturn($patchRegistryMock);
175172
// phpstan:ignore "Class SomeDataPatch not found."
176173
$patch1 = $this->createMock(\SomeDataPatch::class);
177174
$patch1->expects($this->once())->method('apply');
178-
$patch1->expects($this->once())->method('getAliases')->willReturn([]);
175+
$patch1->expects($this->any())->method('getAliases')->willReturn([]);
179176
// phpstan:ignore "Class OtherDataPatch not found."
180177
$patch2 = $this->createMock(\OtherDataPatch::class);
181178
$patch2->expects($this->once())->method('apply');
182-
$patch2->expects($this->once())->method('getAliases')->willReturn([]);
179+
$patch2->expects($this->any())->method('getAliases')->willReturn([]);
183180

184181
$this->objectManagerMock->expects($this->any())->method('create')->willReturnMap(
185182
[

0 commit comments

Comments
 (0)