@@ -72,10 +72,14 @@ protected function setUp(): void
72
72
*/
73
73
public function testValidateCorrectComposerJson (): void
74
74
{
75
- $ this ->magentoVersionMock ->expects ($ this ->atLeastOnce ())
75
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
76
76
->method ('isGreaterOrEqual ' )
77
77
->with ('2.3 ' )
78
78
->willReturn (true );
79
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
80
+ ->method ('isGreaterOrEqual ' )
81
+ ->with ('2.4.3 ' )
82
+ ->willReturn (false );
79
83
$ this ->fileListMock ->expects ($ this ->once ())
80
84
->method ('getMagentoComposer ' )
81
85
->willReturn (__DIR__ . '/_files/correct_composer_2.3.json ' );
@@ -90,10 +94,14 @@ public function testValidateCorrectComposerJson(): void
90
94
*/
91
95
public function testValidateCorrectLaminasComposerJson (): void
92
96
{
93
- $ this ->magentoVersionMock ->expects ($ this ->atLeastOnce ())
97
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
94
98
->method ('isGreaterOrEqual ' )
95
99
->with ('2.3 ' )
96
100
->willReturn (true );
101
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
102
+ ->method ('isGreaterOrEqual ' )
103
+ ->with ('2.4.3 ' )
104
+ ->willReturn (false );
97
105
$ this ->fileListMock ->expects ($ this ->once ())
98
106
->method ('getMagentoComposer ' )
99
107
->willReturn (__DIR__ . '/_files/correct_composer_2.3_2.json ' );
@@ -108,10 +116,14 @@ public function testValidateCorrectLaminasComposerJson(): void
108
116
*/
109
117
public function testValidateCorrectAutoload243ComposerJson (): void
110
118
{
111
- $ this ->magentoVersionMock ->expects ($ this ->atLeastOnce ())
119
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
112
120
->method ('isGreaterOrEqual ' )
113
121
->with ('2.3 ' )
114
122
->willReturn (true );
123
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
124
+ ->method ('isGreaterOrEqual ' )
125
+ ->with ('2.4.3 ' )
126
+ ->willReturn (false );
115
127
$ this ->fileListMock ->expects ($ this ->once ())
116
128
->method ('getMagentoComposer ' )
117
129
->willReturn (__DIR__ . '/_files/correct_composer_2.3_2.json ' );
@@ -126,10 +138,14 @@ public function testValidateCorrectAutoload243ComposerJson(): void
126
138
*/
127
139
public function testValidateWrongComposerJson (): void
128
140
{
129
- $ this ->magentoVersionMock ->expects ($ this ->atLeastOnce ())
141
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
130
142
->method ('isGreaterOrEqual ' )
131
143
->with ('2.3 ' )
132
144
->willReturn (true );
145
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
146
+ ->method ('isGreaterOrEqual ' )
147
+ ->with ('2.4.3 ' )
148
+ ->willReturn (false );
133
149
$ this ->fileListMock ->expects ($ this ->once ())
134
150
->method ('getMagentoComposer ' )
135
151
->willReturn (__DIR__ . '/_files/wrong_composer_2.3.json ' );
@@ -155,10 +171,14 @@ public function testValidateWrongComposerJson(): void
155
171
*/
156
172
public function testValidateMagentoLower23 (): void
157
173
{
158
- $ this ->magentoVersionMock ->expects ($ this ->atLeastOnce ())
174
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
159
175
->method ('isGreaterOrEqual ' )
160
176
->with ('2.3 ' )
161
177
->willReturn (false );
178
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
179
+ ->method ('isGreaterOrEqual ' )
180
+ ->with ('2.4.3 ' )
181
+ ->willReturn (false );
162
182
$ this ->fileListMock ->expects ($ this ->never ())
163
183
->method ('getMagentoComposer ' );
164
184
$ this ->resultFactoryMock ->expects ($ this ->once ())
@@ -172,7 +192,11 @@ public function testValidateMagentoLower23(): void
172
192
*/
173
193
public function testValidateMagentoHigherEqual243 (): void
174
194
{
175
- $ this ->magentoVersionMock ->expects ($ this ->atLeastOnce ())
195
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
196
+ ->method ('isGreaterOrEqual ' )
197
+ ->with ('2.3 ' )
198
+ ->willReturn (false );
199
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
176
200
->method ('isGreaterOrEqual ' )
177
201
->with ('2.4.3 ' )
178
202
->willReturn (false );
@@ -189,10 +213,14 @@ public function testValidateMagentoHigherEqual243(): void
189
213
*/
190
214
public function testValidateComposerFileNotExists (): void
191
215
{
192
- $ this ->magentoVersionMock ->expects ($ this ->atLeastOnce ())
216
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
193
217
->method ('isGreaterOrEqual ' )
194
218
->with ('2.3 ' )
195
219
->willReturn (true );
220
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
221
+ ->method ('isGreaterOrEqual ' )
222
+ ->with ('2.4.3 ' )
223
+ ->willReturn (true );
196
224
$ this ->fileListMock ->expects ($ this ->once ())
197
225
->method ('getMagentoComposer ' )
198
226
->willReturn (__DIR__ . '/_files/file_not_exists.json ' );
@@ -212,7 +240,7 @@ public function testValidateComposerFileNotExists(): void
212
240
*/
213
241
public function testValidateCantGetMagentoVersion (): void
214
242
{
215
- $ this ->magentoVersionMock ->expects ($ this ->atLeastOnce ())
243
+ $ this ->magentoVersionMock ->expects ($ this ->once ())
216
244
->method ('isGreaterOrEqual ' )
217
245
->willThrowException (new UndefinedPackageException ('some error ' ));
218
246
$ this ->fileListMock ->expects ($ this ->never ())
0 commit comments