Skip to content

Commit 69cd2e6

Browse files
author
Alex Bomko
committed
MAGETWO-34125: Merge MAGETWO-32073 and design changes to mainline
- fix tests
1 parent 6fa736f commit 69cd2e6

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

setup/src/Magento/Setup/Test/Unit/Controller/CustomizeYourStoreTest.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ public function setup()
4040
public function testIndexAction($expected)
4141
{
4242
$this->sampleData->expects($this->once())->method('isDeployed')->willReturn($expected['isSampledataEnabled']);
43+
$this->sampleData->expects($this->once())->method('isInstalledSuccessfully')
44+
->willReturn($expected['isSampleDataInstalled']);
45+
$this->sampleData->expects($this->once())->method('isInstallationError')
46+
->willReturn($expected['isSampleDataErrorInstallation']);
4347
$this->lists->expects($this->once())->method('getTimezoneList')->willReturn($expected['timezone']);
4448
$this->lists->expects($this->once())->method('getCurrencyList')->willReturn($expected['currency']);
4549
$this->lists->expects($this->once())->method('getLocaleList')->willReturn($expected['language']);
@@ -64,8 +68,13 @@ public function indexActionDataProvider()
6468
$timezones = ['timezone' => ['America/New_York'=>'EST', 'America/Chicago' => 'CST']];
6569
$currency = ['currency' => ['USD'=>'US Dollar', 'EUR' => 'Euro']];
6670
$language = ['language' => ['en_US'=>'English (USA)', 'en_UK' => 'English (UK)']];
67-
$sampleDataTrue = ['isSampledataEnabled' => true];
68-
$sampleDataFalse = ['isSampledataEnabled' => false];
71+
$sampleData = [
72+
'isSampleDataInstalled' => null,
73+
'isSampleDataErrorInstallation' => null,
74+
'isSampledataEnabled' => null
75+
];
76+
$sampleDataTrue = array_merge($sampleData, ['isSampledataEnabled' => true]);
77+
$sampleDataFalse = array_merge($sampleData, ['isSampledataEnabled' => false]);
6978

7079
return [
7180
'with_all_data' => [array_merge($timezones, $currency, $language, $sampleDataTrue)],
@@ -76,7 +85,7 @@ public function indexActionDataProvider()
7685
'empty_timezone_data' => [array_merge(['timezone' => []], $currency, $language, $sampleDataTrue)],
7786
'empty_language_data' => [array_merge($timezones, $currency, ['language' => []], $sampleDataTrue)],
7887
'false_sample_data' => [array_merge($timezones, $currency, $language, $sampleDataFalse)],
79-
'no_sample_data' => [array_merge($timezones, $currency, $language, ['isSampledataEnabled' => null])],
88+
'no_sample_data' => [array_merge($timezones, $currency, $language, $sampleData)],
8089
];
8190
}
8291

0 commit comments

Comments
 (0)