@@ -168,10 +168,12 @@ public function __construct(
168
168
$ loadTestExtensionAttributes = false
169
169
) {
170
170
if (getcwd () != BP . '/dev/tests/integration ' ) {
171
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
171
172
chdir (BP . '/dev/tests/integration ' );
172
173
}
173
174
$ this ->_shell = $ shell ;
174
175
$ this ->installConfigFile = $ installConfigFile ;
176
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
175
177
$ this ->_globalConfigDir = realpath ($ globalConfigDir );
176
178
$ this ->_appMode = $ appMode ;
177
179
$ this ->installDir = $ installDir ;
@@ -251,6 +253,7 @@ public function getDbInstance()
251
253
protected function getInstallConfig ()
252
254
{
253
255
if (null === $ this ->installConfig ) {
256
+ // phpcs:ignore Magento2.Security.IncludeFile
254
257
$ this ->installConfig = include $ this ->installConfigFile ;
255
258
}
256
259
return $ this ->installConfig ;
@@ -293,6 +296,7 @@ public function getInitParams()
293
296
*/
294
297
public function isInstalled ()
295
298
{
299
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
296
300
return is_file ($ this ->getLocalConfig ());
297
301
}
298
302
@@ -426,6 +430,8 @@ public function initialize($overriddenParams = [])
426
430
427
431
/**
428
432
* Create dynamic tables
433
+ *
434
+ * @return void
429
435
*/
430
436
protected function createDynamicTables ()
431
437
{
@@ -562,8 +568,10 @@ private function copyAppConfigFiles()
562
568
);
563
569
foreach ($ globalConfigFiles as $ file ) {
564
570
$ targetFile = $ this ->_configDir . str_replace ($ this ->_globalConfigDir , '' , $ file );
571
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
565
572
$ this ->_ensureDirExists (dirname ($ targetFile ));
566
573
if ($ file !== $ targetFile ) {
574
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
567
575
copy ($ file , $ targetFile );
568
576
}
569
577
}
@@ -577,6 +585,7 @@ private function copyAppConfigFiles()
577
585
private function copyGlobalConfigFile ()
578
586
{
579
587
$ targetFile = $ this ->_configDir . '/config.local.php ' ;
588
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
580
589
copy ($ this ->globalConfigFile , $ targetFile );
581
590
}
582
591
@@ -646,10 +655,13 @@ protected function _resetApp()
646
655
*/
647
656
protected function _ensureDirExists ($ dir )
648
657
{
658
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
649
659
if (!file_exists ($ dir )) {
650
660
$ old = umask (0 );
661
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
651
662
mkdir ($ dir , 0777 , true );
652
663
umask ($ old );
664
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
653
665
} elseif (!is_dir ($ dir )) {
654
666
throw new \Magento \Framework \Exception \LocalizedException (__ ("'%1' is not a directory. " , $ dir ));
655
667
}
0 commit comments