getTestMagentoRootFromEnvironment() public static method

public static getTestMagentoRootFromEnvironment ( string $varname, string $basename ) : string | null
$varname string name of the environment variable containing the test-root
$basename string name of the stopfile containing the test-root
return string | null
Exemplo n.º 1
0
<?php

use N98\Magento\Command\TestCase;
$base = TestCase::getTestMagentoRootFromEnvironment('N98_MAGERUN_TEST_MAGENTO_ROOT', '.n98-magerun');
if (false === $base) {
    unset($base);
    return;
}
@session_start();
$loader = (require __DIR__ . '/../vendor/autoload.php');
/* @var $loader \Composer\Autoload\ClassLoader */
$loader->setUseIncludePath(true);
$paths = array($base . '/app/code/local', $base . '/app/code/community', $base . '/app/code/core', $base . '/lib');
set_include_path(implode(PATH_SEPARATOR, $paths) . PATH_SEPARATOR . get_include_path());
unset($paths, $base);