Skip to content

Commit 9de25f5

Browse files
author
Anton Evers
committed
Shorten DeployStaticContentTest::testDeploy to be within 100 lines
1 parent cc8e8fd commit 9de25f5

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

app/code/Magento/Deploy/Test/Unit/Service/DeployStaticContentTest.php

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ public function testDeploy($options, $expectedContentVersion)
125125
$package->expects($this->exactly(3))->method('getTheme')->willReturn('theme');
126126
$package->expects($this->exactly(2))->method('getLocale')->willReturn('locale');
127127
}
128-
$packages = [
129-
'package' => $package
130-
];
128+
$packages = ['package' => $package];
131129

132130
if ($expectedContentVersion) {
133131
$this->versionStorage->expects($this->once())->method('save')->with($expectedContentVersion);
@@ -150,7 +148,6 @@ public function testDeploy($options, $expectedContentVersion)
150148
->getMockForAbstractClass();
151149
if ($options['refresh-content-version-only']) {
152150
$strategy->expects($this->never())->method('deploy');
153-
$this->deployStrategyFactory->expects($this->never())->method('create');
154151
} else {
155152
$strategy->expects($this->once())->method('deploy')
156153
->with($options)
@@ -201,18 +198,11 @@ public function testDeploy($options, $expectedContentVersion)
201198

202199
$this->objectManager->expects($this->exactly(1))
203200
->method('get')
204-
->withConsecutive(
205-
[MinifyTemplates::class]
206-
)
207-
->willReturnOnConsecutiveCalls(
208-
$minifyTemplates
209-
);
201+
->withConsecutive([MinifyTemplates::class])
202+
->willReturnOnConsecutiveCalls($minifyTemplates);
210203
}
211204

212-
$this->assertEquals(
213-
null,
214-
$this->service->deploy($options)
215-
);
205+
$this->assertEquals(null, $this->service->deploy($options));
216206
}
217207

218208
public function deployDataProvider()

0 commit comments

Comments
 (0)