File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
dev/tests/integration/testsuite/Magento/Ui/Component Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,9 @@ public function setUp()
6666
6767 /** @var Filesystem $filesystem */
6868 $ filesystem = $ objectManager ->create (Filesystem::class);
69- $ this ->appDir = $ filesystem ->getDirectoryRead (DirectoryList::APP );
69+ $ this ->appDir = $ this ->isComposerBuilt ()
70+ ? $ filesystem ->getDirectoryRead (DirectoryList::ROOT )
71+ : $ filesystem ->getDirectoryRead (DirectoryList::APP );
7072 }
7173
7274 /**
@@ -249,4 +251,20 @@ private function getDom($content = null)
249251 }
250252 return $ this ->dom ;
251253 }
254+
255+ /**
256+ * Check magento modules is in app/code.
257+ *
258+ * @return bool
259+ */
260+ private function isComposerBuilt ()
261+ {
262+ $ result = false ;
263+ $ rootJson = json_decode (file_get_contents (BP . '/composer.json ' ), true );
264+ if (preg_match ('/magento\/project-*/ ' , $ rootJson ['name ' ]) == 1 ) {
265+ $ result = true ;
266+ }
267+
268+ return $ result ;
269+ }
252270}
You can’t perform that action at this time.
0 commit comments