autoload.php 1.0 KB

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. use \Magento\Framework\App\Filesystem\DirectoryList;
  7. $baseDir = realpath(__DIR__ . '/../../../../');
  8. require $baseDir . '/app/autoload.php';
  9. require $baseDir . '/vendor/squizlabs/php_codesniffer/autoload.php';
  10. $testsBaseDir = $baseDir . '/dev/tests/static';
  11. $autoloadWrapper = \Magento\Framework\Autoload\AutoloaderRegistry::getAutoloader();
  12. $autoloadWrapper->addPsr4('Magento\\', $testsBaseDir . '/testsuite/Magento/');
  13. $autoloadWrapper->addPsr4(
  14. 'Magento\\TestFramework\\',
  15. [
  16. $testsBaseDir . '/framework/Magento/TestFramework/',
  17. $testsBaseDir . '/../integration/framework/Magento/TestFramework/',
  18. ]
  19. );
  20. $autoloadWrapper->addPsr4('Magento\\CodeMessDetector\\', $testsBaseDir . '/framework/Magento/CodeMessDetector');
  21. $generatedCode = DirectoryList::getDefaultConfig()[DirectoryList::GENERATED_CODE][DirectoryList::PATH];
  22. $autoloadWrapper->addPsr4('Magento\\', $baseDir . '/' . $generatedCode . '/Magento/');