function runTestAutoLoader($autoLoader = null)
{
    $mwVendorPath = __DIR__ . '/../../../vendor/autoload.php';
    $localVendorPath = __DIR__ . '/../vendor/autoload.php';
    if (is_readable($localVendorPath)) {
        $autoLoader = registerAutoloaderPath('local', $localVendorPath);
    } elseif (is_readable($mwVendorPath)) {
        $autoLoader = registerAutoloaderPath('MediaWiki', $mwVendorPath);
    }
    if (!$autoLoader instanceof \Composer\Autoload\ClassLoader) {
        return false;
    }
    return true;
}
예제 #2
0
function runTestAutoLoader()
{
    $mwVendorPath = __DIR__ . '/../../../vendor/autoload.php';
    $localVendorPath = __DIR__ . '/../vendor/autoload.php';
    if (is_readable($localVendorPath)) {
        $autoLoader = registerAutoloaderPath('local', $localVendorPath);
    } elseif (is_readable($mwVendorPath)) {
        $autoLoader = registerAutoloaderPath('MediaWiki', $mwVendorPath);
    }
    if (!$autoLoader instanceof \Composer\Autoload\ClassLoader) {
        return false;
    }
    $autoLoader->addPsr4('Bootstrap\\Tests\\', __DIR__ . '/phpunit');
    return true;
}
예제 #3
0
function runTestAutoLoader()
{
    $mwVendorPath = __DIR__ . '/../../../vendor/autoload.php';
    $localVendorPath = __DIR__ . '/../vendor/autoload.php';
    if (is_readable($localVendorPath)) {
        $autoLoader = registerAutoloaderPath('local', $localVendorPath);
    } elseif (is_readable($mwVendorPath)) {
        $autoLoader = registerAutoloaderPath('MediaWiki', $mwVendorPath);
    } else {
        print "\\No vendor autoloader ...\n\n";
    }
    if (!$autoLoader instanceof \Composer\Autoload\ClassLoader) {
        // For now return true as long as SF is not compatible with Composer
        // of course if it is installed via
        // https://packagist.org/packages/mediawiki/semantic-forms
        // we have no problems
        return true;
    }
    return true;
}