88namespace Magento \CloudComponents \Test \Functional \Acceptance ;
99
1010/**
11- * @group php73
11+ * @group php74
1212 */
1313class AcceptanceCest
1414{
@@ -49,7 +49,7 @@ protected function prepareTemplate(\CliTester $I, string $magentoVersion): void
4949 public function testPatches (\CliTester $ I , \Codeception \Example $ data ): void
5050 {
5151 $ this ->prepareTemplate ($ I , $ data ['magentoVersion ' ]);
52- $ this ->removeESIfExists ($ I );
52+ $ this ->removeESIfExists ($ I, $ data [ ' magentoVersion ' ] );
5353 $ I ->runEceDockerCommand ('build:compose --mode=production ' );
5454 $ I ->runDockerComposeCommand ('run build cloud-build ' );
5555 $ I ->startEnvironment ();
@@ -62,18 +62,21 @@ public function testPatches(\CliTester $I, \Codeception\Example $data): void
6262
6363 /**
6464 * @param \CliTester $I
65+ * @param string $magentoVersion
6566 */
66- protected function removeESIfExists (\CliTester $ I ): void
67+ protected function removeESIfExists (\CliTester $ I, string $ magentoVersion ): void
6768 {
68- $ services = $ I ->readServicesYaml ();
69+ if ($ magentoVersion !== 'master ' && version_compare ($ magentoVersion , '2.4.0 ' , '< ' )) {
70+ $ services = $ I ->readServicesYaml ();
6971
70- if (isset ($ services ['elasticsearch ' ])) {
71- unset($ services ['elasticsearch ' ]);
72- $ I ->writeServicesYaml ($ services );
72+ if (isset ($ services ['elasticsearch ' ])) {
73+ unset($ services ['elasticsearch ' ]);
74+ $ I ->writeServicesYaml ($ services );
7375
74- $ app = $ I ->readAppMagentoYaml ();
75- unset($ app ['relationships ' ]['elasticsearch ' ]);
76- $ I ->writeAppMagentoYaml ($ app );
76+ $ app = $ I ->readAppMagentoYaml ();
77+ unset($ app ['relationships ' ]['elasticsearch ' ]);
78+ $ I ->writeAppMagentoYaml ($ app );
79+ }
7780 }
7881 }
7982
@@ -83,7 +86,7 @@ protected function removeESIfExists(\CliTester $I): void
8386 protected function patchesDataProvider (): array
8487 {
8588 return [
86- ['magentoVersion ' => '2.3.3 ' ],
89+ ['magentoVersion ' => '2.4.0 ' ],
8790 ['magentoVersion ' => 'master ' ],
8891 ];
8992 }
0 commit comments