Skip to content

Commit 70e0e26

Browse files
author
Leonid Poluyanov
committed
MAGETWO-39764: Create pull request for S24 results
1 parent 80941c1 commit 70e0e26

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

setup/src/Magento/Setup/Test/Unit/Model/SampleDataTest.php

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ class SampleDataTest extends \PHPUnit_Framework_TestCase
1818
*/
1919
protected $sampleDataInstall;
2020

21-
/**
22-
* @var \Magento\Framework\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject
23-
*/
24-
protected $objectManagerInterface;
25-
2621
/**
2722
* @var \Magento\Framework\Setup\LoggerInterface
2823
*/
@@ -35,49 +30,11 @@ class SampleDataTest extends \PHPUnit_Framework_TestCase
3530

3631
protected function setUp()
3732
{
38-
$this->objectManagerInterface = $this->getMock(
39-
'Magento\Framework\ObjectManagerInterface',
40-
[
41-
'get',
42-
'create',
43-
'configure'
44-
],
45-
[],
46-
'',
47-
false
48-
);
4933
$this->loggerInterface = $this->getMock('Magento\Framework\Setup\LoggerInterface');
5034
$this->directoryList = $this->getMock('Magento\Framework\App\Filesystem\DirectoryList', [], [], '', false);
5135
$this->sampleDataInstall = new SampleData($this->directoryList);
5236
}
5337

54-
public function testInstall()
55-
{
56-
$areaCode = 'adminhtml';
57-
$userName = 'admin';
58-
$modules = ['module_1', 'module_2'];
59-
$configData = ['config_data'];
60-
$sampleDataLogger = $this->getMock('Magento\SampleData\Model\Logger', ['setSubject'], [], '', false);
61-
$appState = $this->getMock('Magento\Framework\App\State', ['setAreaCode'], [], '', false);
62-
$configLoader = $this->getMock('Magento\Framework\App\ObjectManager\ConfigLoader', ['load'], [], '', false);
63-
$installer = $this->getMock('Magento\SampleData\Model\Installer', ['run'], [], '', false);
64-
$this->objectManagerInterface->expects($this->any())->method('get')->willReturnMap(
65-
[
66-
['Magento\SampleData\Model\Logger', $sampleDataLogger],
67-
['Magento\Framework\App\State', $appState],
68-
['Magento\Framework\App\ObjectManager\ConfigLoader', $configLoader],
69-
['Magento\SampleData\Model\Installer', $installer]
70-
]
71-
);
72-
$sampleDataLogger->expects($this->any())->method('setSubject')->with($this->loggerInterface)->willReturnSelf();
73-
$appState->expects($this->once())->method('setAreaCode')->with($areaCode)->willReturnSelf();
74-
$configLoader->expects($this->once())->method('load')->with($areaCode)->willReturn($configData);
75-
$this->objectManagerInterface->expects($this->once())->method('configure')->with($configData)
76-
->willReturnSelf();
77-
$installer->expects($this->once())->method('run')->with($userName, $modules);
78-
$this->sampleDataInstall->install($this->objectManagerInterface, $this->loggerInterface, $userName, $modules);
79-
}
80-
8138
public function testIsDeployed()
8239
{
8340
$this->directoryList->expects($this->once())->method('getPath')->with('code');

0 commit comments

Comments
 (0)