7
7
8
8
namespace Magento \MagentoCloud \Test \Unit \Service ;
9
9
10
- use Magento \MagentoCloud \Filesystem \Flag \ConfigurationMismatchException ;
11
10
use Magento \MagentoCloud \Package \MagentoVersion ;
12
11
use Magento \MagentoCloud \Package \UndefinedPackageException ;
13
12
use Magento \MagentoCloud \Service \ServiceInterface ;
13
+ use Magento \MagentoCloud \Service \ServiceMismatchException ;
14
14
use Magento \MagentoCloud \Service \Validator ;
15
15
use PHPUnit \Framework \MockObject \MockObject ;
16
16
use PHPUnit \Framework \TestCase ;
@@ -44,8 +44,8 @@ protected function setUp()
44
44
* @param string $magentoVersion
45
45
* @param array $versions
46
46
* @param int $errorsNumber
47
- * @throws ConfigurationMismatchException
48
47
* @throws UndefinedPackageException
48
+ * @throws ServiceMismatchException
49
49
*
50
50
* @dataProvider validateVersionsDataProvider
51
51
*/
@@ -58,8 +58,8 @@ public function testValidateVersions(string $magentoVersion, array $versions, in
58
58
}
59
59
60
60
/**
61
- * @throws ConfigurationMismatchException
62
61
* @throws UndefinedPackageException
62
+ * @throws \Magento\MagentoCloud\Service\ServiceMismatchException
63
63
*/
64
64
public function testValidateFailMessage ()
65
65
{
@@ -83,8 +83,8 @@ public function testValidateFailMessage()
83
83
}
84
84
85
85
/**
86
- * @throws ConfigurationMismatchException
87
86
* @throws UndefinedPackageException
87
+ * @throws ServiceMismatchException
88
88
*/
89
89
public function testValidateNonexistentService ()
90
90
{
@@ -195,6 +195,27 @@ public function validateVersionsDataProvider(): array
195
195
],
196
196
1
197
197
],
198
+ [
199
+ '2.4.1 ' ,
200
+ [
201
+ ServiceInterface::NAME_DB_MYSQL => '5.6 ' ,
202
+ ],
203
+ 1
204
+ ],
205
+ [
206
+ '2.4.1 ' ,
207
+ [
208
+ ServiceInterface::NAME_DB_MYSQL => '5.7 ' ,
209
+ ],
210
+ 0
211
+ ],
212
+ [
213
+ '2.4.1 ' ,
214
+ [
215
+ ServiceInterface::NAME_DB_MYSQL => '8.0 ' ,
216
+ ],
217
+ 0
218
+ ],
198
219
[
199
220
'2.4.2 ' ,
200
221
[
@@ -212,13 +233,27 @@ public function validateVersionsDataProvider(): array
212
233
'2.3.6 ' ,
213
234
[
214
235
ServiceInterface::NAME_PHP => '7.4 ' , // wrong
215
- ServiceInterface::NAME_DB_MARIA => '10.2 ' ,
236
+ ServiceInterface::NAME_DB_MARIA => '10.3 ' , // wrong
216
237
ServiceInterface::NAME_NGINX => '1.19 ' ,
217
238
ServiceInterface::NAME_VARNISH => '6.2 ' ,
218
239
ServiceInterface::NAME_REDIS => '5.0 ' ,
219
240
ServiceInterface::NAME_ELASTICSEARCH => '7.9 ' , //wrong
220
241
],
221
- 2
242
+ 3
243
+ ],
244
+ [
245
+ '2.3.6-p1 ' ,
246
+ [
247
+ ServiceInterface::NAME_DB_MARIA => '10.3 ' ,
248
+ ],
249
+ 0
250
+ ],
251
+ [
252
+ '2.3.6-p1 ' ,
253
+ [
254
+ ServiceInterface::NAME_DB_MARIA => '10.4 ' , // wrong
255
+ ],
256
+ 1
222
257
],
223
258
[
224
259
'2.3.7 ' ,
0 commit comments