Skip to content

Commit

Permalink
Shorten DeployStaticContentTest::testDeploy to be within 100 lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Evers committed Jun 13, 2017
1 parent cc8e8fd commit 9de25f5
Showing 1 changed file with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ public function testDeploy($options, $expectedContentVersion)
$package->expects($this->exactly(3))->method('getTheme')->willReturn('theme');
$package->expects($this->exactly(2))->method('getLocale')->willReturn('locale');
}
$packages = [
'package' => $package
];
$packages = ['package' => $package];

if ($expectedContentVersion) {
$this->versionStorage->expects($this->once())->method('save')->with($expectedContentVersion);
Expand All @@ -150,7 +148,6 @@ public function testDeploy($options, $expectedContentVersion)
->getMockForAbstractClass();
if ($options['refresh-content-version-only']) {
$strategy->expects($this->never())->method('deploy');
$this->deployStrategyFactory->expects($this->never())->method('create');
} else {
$strategy->expects($this->once())->method('deploy')
->with($options)
Expand Down Expand Up @@ -201,18 +198,11 @@ public function testDeploy($options, $expectedContentVersion)

$this->objectManager->expects($this->exactly(1))
->method('get')
->withConsecutive(
[MinifyTemplates::class]
)
->willReturnOnConsecutiveCalls(
$minifyTemplates
);
->withConsecutive([MinifyTemplates::class])
->willReturnOnConsecutiveCalls($minifyTemplates);
}

$this->assertEquals(
null,
$this->service->deploy($options)
);
$this->assertEquals(null, $this->service->deploy($options));
}

public function deployDataProvider()
Expand Down

0 comments on commit 9de25f5

Please sign in to comment.