This repository has been archived on 2025-01-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/vendor/behat/mink/driver-testsuite/bootstrap.php

28 lines
784 B
PHP

<?php
$file = __DIR__.'/../../../autoload.php';
if (!file_exists($file)) {
echo PHP_EOL.'The Mink driver testsuite expects Mink to be installed as a composer dependency of your project'.PHP_EOL;
exit(1);
}
/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require $file;
$loader->addPsr4('Behat\Mink\Tests\Driver\\', __DIR__.'/tests');
// Clean the global variables
unset($file);
unset($loader);
// Check the definition of the driverLoaderFactory
if (!isset($GLOBALS['driver_config_factory'])) {
echo PHP_EOL.'The "driver_config_factory" global variable must be set.'.PHP_EOL;
exit(1);
}
if (!is_callable($GLOBALS['driver_config_factory'])) {
echo PHP_EOL.'The "driver_config_factory" global variable must be a callable.'.PHP_EOL;
exit(1);
}