16
16
*/
17
17
class ThemeUninstallCommandTest extends \PHPUnit_Framework_TestCase
18
18
{
19
- /**
20
- * @var \Magento\Framework\App\DeploymentConfig|\PHPUnit_Framework_MockObject_MockObject
21
- */
22
- private $ deploymentConfig ;
23
-
24
19
/**
25
20
* @var \Magento\Framework\App\MaintenanceMode|\PHPUnit_Framework_MockObject_MockObject
26
21
*/
@@ -78,7 +73,6 @@ class ThemeUninstallCommandTest extends \PHPUnit_Framework_TestCase
78
73
79
74
public function setUp ()
80
75
{
81
- $ this ->deploymentConfig = $ this ->getMock ('Magento\Framework\App\DeploymentConfig ' , [], [], '' , false );
82
76
$ this ->maintenanceMode = $ this ->getMock ('Magento\Framework\App\MaintenanceMode ' , [], [], '' , false );
83
77
$ composerInformation = $ this ->getMock ('Magento\Framework\Composer\ComposerInformation ' , [], [], '' , false );
84
78
$ composerInformation ->expects ($ this ->any ())
@@ -109,7 +103,6 @@ public function setUp()
109
103
$ this ->cache ,
110
104
$ this ->cleanupFiles ,
111
105
$ composerInformation ,
112
- $ this ->deploymentConfig ,
113
106
$ this ->maintenanceMode ,
114
107
$ this ->filesystem ,
115
108
$ this ->dependencyChecker ,
@@ -122,19 +115,8 @@ public function setUp()
122
115
$ this ->tester = new CommandTester ($ this ->command );
123
116
}
124
117
125
- public function testExecuteWithoutApplicationInstalled ()
126
- {
127
- $ this ->deploymentConfig ->expects ($ this ->once ())->method ('isAvailable ' )->willReturn (false );
128
- $ this ->tester ->execute (['theme ' => ['test ' ]]);
129
- $ this ->assertContains (
130
- 'You cannot run this command because the Magento application is not installed. ' ,
131
- $ this ->tester ->getDisplay ()
132
- );
133
- }
134
-
135
118
public function testExecuteFailedValidationNotPackage ()
136
119
{
137
- $ this ->deploymentConfig ->expects ($ this ->once ())->method ('isAvailable ' )->willReturn (true );
138
120
$ dirRead = $ this ->getMock ('Magento\Framework\Filesystem\Directory\Read ' , [], [], '' , false );
139
121
// package name "dummy" is not in root composer.json file
140
122
$ dirRead ->expects ($ this ->any ())
@@ -167,7 +149,6 @@ public function testExecuteFailedValidationNotPackage()
167
149
168
150
public function testExecuteFailedValidationNotTheme ()
169
151
{
170
- $ this ->deploymentConfig ->expects ($ this ->once ())->method ('isAvailable ' )->willReturn (true );
171
152
$ dirRead = $ this ->getMock ('Magento\Framework\Filesystem\Directory\Read ' , [], [], '' , false );
172
153
$ dirRead ->expects ($ this ->any ())->method ('isExist ' )->willReturn (false );
173
154
$ this ->filesystem ->expects ($ this ->any ())
@@ -187,7 +168,6 @@ public function testExecuteFailedValidationNotTheme()
187
168
188
169
public function testExecuteFailedValidationMixed ()
189
170
{
190
- $ this ->deploymentConfig ->expects ($ this ->once ())->method ('isAvailable ' )->willReturn (true );
191
171
$ dirRead = $ this ->getMock ('Magento\Framework\Filesystem\Directory\Read ' , [], [], '' , false );
192
172
// package name "dummy" is not in root composer.json file
193
173
$ dirRead ->expects ($ this ->any ())
@@ -237,7 +217,6 @@ public function testExecuteFailedValidationMixed()
237
217
238
218
public function setUpPassValidation ()
239
219
{
240
- $ this ->deploymentConfig ->expects ($ this ->once ())->method ('isAvailable ' )->willReturn (true );
241
220
$ dirRead = $ this ->getMock ('Magento\Framework\Filesystem\Directory\Read ' , [], [], '' , false );
242
221
// package name "dummy" is not in root composer.json file
243
222
$ dirRead ->expects ($ this ->any ())
0 commit comments