Skip to content

Commit 10233ee

Browse files
committed
MCLOUD-7072: Add CLI command for generating .magento.env.yaml
1 parent a12607b commit 10233ee

File tree

2 files changed

+197
-158
lines changed

2 files changed

+197
-158
lines changed

src/Test/Functional/Acceptance/RedisPhp72Cest.php

Lines changed: 1 addition & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -82,163 +82,6 @@ protected function wrongConfigurationDataProvider(): array
8282
*/
8383
protected function goodConfigurationDataProvider(): array
8484
{
85-
return [
86-
[
87-
'version' => '2.3.0',
88-
'backendModel' => [
89-
'stage' => [
90-
'deploy' => [
91-
'REDIS_BACKEND' => 'Cm_Cache_Backend_Redis',
92-
],
93-
],
94-
],
95-
'expectedBackend' => 'Cm_Cache_Backend_Redis',
96-
'expectedConfig' => [
97-
'backend_options' => [
98-
'server' => 'redis',
99-
'port' => '6379',
100-
'database' => 1,
101-
],
102-
],
103-
],
104-
[
105-
'version' => '2.3.0',
106-
'backendModel' => [
107-
'stage' => [
108-
'deploy' => [
109-
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
110-
],
111-
],
112-
],
113-
'expectedBackend' => '\Magento\Framework\Cache\Backend\Redis',
114-
'expectedConfig' => [
115-
'backend_options' => [
116-
'server' => 'redis',
117-
'port' => '6379',
118-
'database' => 1,
119-
],
120-
],
121-
],
122-
[
123-
'version' => '2.3.0',
124-
'backendModel' => [
125-
'stage' => [
126-
'deploy' => [
127-
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
128-
],
129-
],
130-
],
131-
'expectedBackend' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
132-
'expectedConfig' => [
133-
'backend_options' => [
134-
'remote_backend' => '\Magento\Framework\Cache\Backend\Redis',
135-
'remote_backend_options' => [
136-
'persistent' => 0,
137-
'server' => 'redis',
138-
'database' => 1,
139-
'port' => '6379',
140-
'password' => '',
141-
'compress_data' => '1',
142-
],
143-
'local_backend' => 'Cm_Cache_Backend_File',
144-
'local_backend_options' => [
145-
'cache_dir' => '/dev/shm/',
146-
]
147-
]
148-
],
149-
],
150-
[
151-
'version' => '2.3.1',
152-
'backendModel' => [
153-
'stage' => [
154-
'deploy' => [
155-
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
156-
],
157-
],
158-
],
159-
'expectedBackend' => '\Magento\Framework\Cache\Backend\Redis',
160-
'expectedConfig' => [
161-
'backend_options' => [
162-
'server' => 'redis',
163-
'port' => '6379',
164-
'database' => 1,
165-
],
166-
],
167-
],
168-
[
169-
'version' => '2.3.1',
170-
'backendModel' => [
171-
'stage' => [
172-
'deploy' => [
173-
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
174-
],
175-
],
176-
],
177-
'expectedBackend' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
178-
'expectedConfig' => [
179-
'backend_options' => [
180-
'remote_backend' => '\Magento\Framework\Cache\Backend\Redis',
181-
'remote_backend_options' => [
182-
'persistent' => 0,
183-
'server' => 'redis',
184-
'database' => 1,
185-
'port' => '6379',
186-
'password' => '',
187-
'compress_data' => '1',
188-
],
189-
'local_backend' => 'Cm_Cache_Backend_File',
190-
'local_backend_options' => [
191-
'cache_dir' => '/dev/shm/',
192-
]
193-
]
194-
],
195-
],
196-
[
197-
'version' => '2.3.2',
198-
'backendModel' => [
199-
'stage' => [
200-
'deploy' => [
201-
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
202-
],
203-
],
204-
],
205-
'expectedBackend' => '\Magento\Framework\Cache\Backend\Redis',
206-
'expectedConfig' => [
207-
'backend_options' => [
208-
'server' => 'redis',
209-
'port' => '6379',
210-
'database' => 1,
211-
],
212-
],
213-
],
214-
[
215-
'version' => '2.3.2',
216-
'backendModel' => [
217-
'stage' => [
218-
'deploy' => [
219-
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
220-
],
221-
],
222-
],
223-
'expectedBackend' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
224-
'expectedConfig' => [
225-
'backend_options' => [
226-
'remote_backend' => '\Magento\Framework\Cache\Backend\Redis',
227-
'remote_backend_options' => [
228-
'persistent' => 0,
229-
'server' => 'redis',
230-
'database' => 1,
231-
'port' => '6379',
232-
'password' => '',
233-
'compress_data' => '1',
234-
],
235-
'local_backend' => 'Cm_Cache_Backend_File',
236-
'local_backend_options' => [
237-
'cache_dir' => '/dev/shm/',
238-
]
239-
]
240-
],
241-
],
242-
];
85+
return [];
24386
}
24487
}
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\MagentoCloud\Test\Functional\Acceptance;
9+
10+
/**
11+
* @group php72
12+
*/
13+
class RedisPhp72Cest2 extends RedisCest
14+
{
15+
/**
16+
* @return array
17+
*/
18+
protected function defaultConfigurationDataProvider(): array
19+
{
20+
return [];
21+
}
22+
23+
/**
24+
* @return array
25+
*/
26+
protected function wrongConfigurationDataProvider(): array
27+
{
28+
return [];
29+
}
30+
31+
/**
32+
* @return array
33+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
34+
*/
35+
protected function goodConfigurationDataProvider(): array
36+
{
37+
return [
38+
[
39+
'version' => '2.3.0',
40+
'backendModel' => [
41+
'stage' => [
42+
'deploy' => [
43+
'REDIS_BACKEND' => 'Cm_Cache_Backend_Redis',
44+
],
45+
],
46+
],
47+
'expectedBackend' => 'Cm_Cache_Backend_Redis',
48+
'expectedConfig' => [
49+
'backend_options' => [
50+
'server' => 'redis',
51+
'port' => '6379',
52+
'database' => 1,
53+
],
54+
],
55+
],
56+
[
57+
'version' => '2.3.0',
58+
'backendModel' => [
59+
'stage' => [
60+
'deploy' => [
61+
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
62+
],
63+
],
64+
],
65+
'expectedBackend' => '\Magento\Framework\Cache\Backend\Redis',
66+
'expectedConfig' => [
67+
'backend_options' => [
68+
'server' => 'redis',
69+
'port' => '6379',
70+
'database' => 1,
71+
],
72+
],
73+
],
74+
[
75+
'version' => '2.3.0',
76+
'backendModel' => [
77+
'stage' => [
78+
'deploy' => [
79+
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
80+
],
81+
],
82+
],
83+
'expectedBackend' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
84+
'expectedConfig' => [
85+
'backend_options' => [
86+
'remote_backend' => '\Magento\Framework\Cache\Backend\Redis',
87+
'remote_backend_options' => [
88+
'persistent' => 0,
89+
'server' => 'redis',
90+
'database' => 1,
91+
'port' => '6379',
92+
'password' => '',
93+
'compress_data' => '1',
94+
],
95+
'local_backend' => 'Cm_Cache_Backend_File',
96+
'local_backend_options' => [
97+
'cache_dir' => '/dev/shm/',
98+
]
99+
]
100+
],
101+
],
102+
[
103+
'version' => '2.3.1',
104+
'backendModel' => [
105+
'stage' => [
106+
'deploy' => [
107+
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
108+
],
109+
],
110+
],
111+
'expectedBackend' => '\Magento\Framework\Cache\Backend\Redis',
112+
'expectedConfig' => [
113+
'backend_options' => [
114+
'server' => 'redis',
115+
'port' => '6379',
116+
'database' => 1,
117+
],
118+
],
119+
],
120+
[
121+
'version' => '2.3.1',
122+
'backendModel' => [
123+
'stage' => [
124+
'deploy' => [
125+
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
126+
],
127+
],
128+
],
129+
'expectedBackend' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
130+
'expectedConfig' => [
131+
'backend_options' => [
132+
'remote_backend' => '\Magento\Framework\Cache\Backend\Redis',
133+
'remote_backend_options' => [
134+
'persistent' => 0,
135+
'server' => 'redis',
136+
'database' => 1,
137+
'port' => '6379',
138+
'password' => '',
139+
'compress_data' => '1',
140+
],
141+
'local_backend' => 'Cm_Cache_Backend_File',
142+
'local_backend_options' => [
143+
'cache_dir' => '/dev/shm/',
144+
]
145+
]
146+
],
147+
],
148+
[
149+
'version' => '2.3.2',
150+
'backendModel' => [
151+
'stage' => [
152+
'deploy' => [
153+
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\Redis',
154+
],
155+
],
156+
],
157+
'expectedBackend' => '\Magento\Framework\Cache\Backend\Redis',
158+
'expectedConfig' => [
159+
'backend_options' => [
160+
'server' => 'redis',
161+
'port' => '6379',
162+
'database' => 1,
163+
],
164+
],
165+
],
166+
[
167+
'version' => '2.3.2',
168+
'backendModel' => [
169+
'stage' => [
170+
'deploy' => [
171+
'REDIS_BACKEND' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
172+
],
173+
],
174+
],
175+
'expectedBackend' => '\Magento\Framework\Cache\Backend\RemoteSynchronizedCache',
176+
'expectedConfig' => [
177+
'backend_options' => [
178+
'remote_backend' => '\Magento\Framework\Cache\Backend\Redis',
179+
'remote_backend_options' => [
180+
'persistent' => 0,
181+
'server' => 'redis',
182+
'database' => 1,
183+
'port' => '6379',
184+
'password' => '',
185+
'compress_data' => '1',
186+
],
187+
'local_backend' => 'Cm_Cache_Backend_File',
188+
'local_backend_options' => [
189+
'cache_dir' => '/dev/shm/',
190+
]
191+
]
192+
],
193+
],
194+
];
195+
}
196+
}

0 commit comments

Comments
 (0)