updated init script to use autoloading
This commit is contained in:
16
init.php
16
init.php
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the Behat\MinkExtension
|
* This file is part of the Behat
|
||||||
*
|
*
|
||||||
* (c) Konstantin Kudryashov <ever.zet@gmail.com>
|
* (c) Konstantin Kudryashov <ever.zet@gmail.com>
|
||||||
*
|
*
|
||||||
@@ -9,13 +9,11 @@
|
|||||||
* with this source code in the file LICENSE.
|
* with this source code in the file LICENSE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/src/Behat/MinkExtension/Compiler/SelectorsPass.php';
|
spl_autoload_register(function($class) {
|
||||||
require_once __DIR__.'/src/Behat/MinkExtension/Compiler/SessionsPass.php';
|
if (false !== strpos($class, 'Behat\\MinkExtension')) {
|
||||||
require_once __DIR__.'/src/Behat/MinkExtension/Context/MinkAwareContextInterface.php';
|
require_once(__DIR__.'/src/'.str_replace('\\', '/', $class).'.php');
|
||||||
require_once __DIR__.'/src/Behat/MinkExtension/Context/MinkAwareContextInitializer.php';
|
return true;
|
||||||
require_once __DIR__.'/src/Behat/MinkExtension/Context/RawMinkContext.php';
|
}
|
||||||
require_once __DIR__.'/src/Behat/MinkExtension/Context/MinkContext.php';
|
}, true, false);
|
||||||
require_once __DIR__.'/src/Behat/MinkExtension/Configuration.php';
|
|
||||||
require_once __DIR__.'/src/Behat/MinkExtension/Extension.php';
|
|
||||||
|
|
||||||
return new Behat\MinkExtension\Extension;
|
return new Behat\MinkExtension\Extension;
|
||||||
|
|||||||
Reference in New Issue
Block a user