bootstrap.php 784 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. $file = __DIR__.'/../../../autoload.php';
  3. if (!file_exists($file)) {
  4. echo PHP_EOL.'The Mink driver testsuite expects Mink to be installed as a composer dependency of your project'.PHP_EOL;
  5. exit(1);
  6. }
  7. /** @var \Composer\Autoload\ClassLoader $loader */
  8. $loader = require $file;
  9. $loader->addPsr4('Behat\Mink\Tests\Driver\\', __DIR__.'/tests');
  10. // Clean the global variables
  11. unset($file);
  12. unset($loader);
  13. // Check the definition of the driverLoaderFactory
  14. if (!isset($GLOBALS['driver_config_factory'])) {
  15. echo PHP_EOL.'The "driver_config_factory" global variable must be set.'.PHP_EOL;
  16. exit(1);
  17. }
  18. if (!is_callable($GLOBALS['driver_config_factory'])) {
  19. echo PHP_EOL.'The "driver_config_factory" global variable must be a callable.'.PHP_EOL;
  20. exit(1);
  21. }