File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
dev/tests/setup-integration
_files/Magento/TestSetupDeclarationModule1
Magento/TestFramework/Annotation Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 6
6
7
7
use Magento \Framework \Component \ComponentRegistrar ;
8
8
9
- ComponentRegistrar::register (ComponentRegistrar::MODULE , 'Magento_TestSetupDeclarationModule1 ' , __DIR__ );
9
+ $ registrar = new ComponentRegistrar ();
10
+ if ($ registrar ->getPath (ComponentRegistrar::MODULE , 'Magento_TestSetupDeclarationModule1 ' ) === null ) {
11
+ ComponentRegistrar::register (ComponentRegistrar::MODULE , 'Magento_TestSetupDeclarationModule1 ' , __DIR__ );
12
+ }
Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \TestFramework \Annotation ;
8
8
9
- use Magento \Framework \Filesystem \Io \File ;
10
9
use Magento \TestFramework \Deploy \CliCommand ;
11
10
use Magento \TestFramework \Deploy \TestModuleManager ;
12
11
@@ -45,7 +44,10 @@ public function startTest(\PHPUnit\Framework\TestCase $test)
45
44
$ annotations = $ test ->getAnnotations ();
46
45
//This annotation can be declared only on method level
47
46
if (isset ($ annotations ['method ' ]['moduleName ' ])) {
48
- $ this ->cliCommand ->introduceModule ($ annotations ['method ' ]['moduleName ' ][0 ]);
47
+ $ moduleName = $ annotations ['method ' ]['moduleName ' ][0 ];
48
+ $ this ->cliCommand ->introduceModule ($ moduleName );
49
+ $ path = MAGENTO_MODULES_PATH . explode ("_ " , $ moduleName )[1 ] . '/registration.php ' ;
50
+ include_once $ path ;
49
51
}
50
52
}
51
53
}
Original file line number Diff line number Diff line change 73
73
$ application ,
74
74
new \Magento \TestFramework \Bootstrap \MemoryFactory ($ shell )
75
75
);
76
+ //remove test modules files
77
+ include_once __DIR__ . '/../../setup-integration/framework/removeTestModules.php ' ;
76
78
$ bootstrap ->runBootstrap ();
77
79
$ application ->createInstallDir ();
78
80
//We do not want to install anything
You can’t perform that action at this time.
0 commit comments