|
1 | 1 | <?php |
2 | 2 |
|
3 | | -include_once(__DIR__ . '/../../php/class-ee.php'); |
4 | | -include_once(__DIR__ . '/../../php/utils.php'); |
| 3 | +define('EE_ROOT',__DIR__ . '/../..'); |
5 | 4 |
|
| 5 | +include_once(EE_ROOT . '/php/class-ee.php'); |
| 6 | +include_once(EE_ROOT . '/php/EE/Runner.php'); |
| 7 | +include_once(EE_ROOT . '/php/utils.php'); |
| 8 | + |
| 9 | +define( 'EE', true ); |
| 10 | +define( 'EE_VERSION', trim( file_get_contents( EE_ROOT . '/VERSION' ) ) ); |
6 | 11 | define( 'EE_CONF_ROOT', '/opt/easyengine' ); |
7 | 12 |
|
| 13 | +require_once EE_ROOT . '/php/bootstrap.php'; |
| 14 | + |
| 15 | +if ( ! class_exists( 'EE\Runner' ) ) { |
| 16 | + require_once EE_ROOT . '/php/EE/Runner.php'; |
| 17 | +} |
| 18 | + |
| 19 | +if ( ! class_exists( 'EE\Configurator' ) ) { |
| 20 | + require_once EE_ROOT . '/php/EE/Configurator.php'; |
| 21 | +} |
| 22 | + |
| 23 | +$logger_dir = EE_ROOT . '/php/EE/Loggers'; |
| 24 | +$iterator = new \DirectoryIterator( $logger_dir ); |
| 25 | + |
| 26 | +// Make sure the base class is declared first. |
| 27 | +include_once "$logger_dir/Base.php"; |
| 28 | + |
| 29 | +foreach ( $iterator as $filename ) { |
| 30 | + if ( '.php' !== substr( $filename, - 4 ) ) { |
| 31 | + continue; |
| 32 | + } |
| 33 | + |
| 34 | + include_once "$logger_dir/$filename"; |
| 35 | +} |
| 36 | +$runner = \EE::get_runner(); |
| 37 | +$runner->init_logger(); |
| 38 | + |
8 | 39 | use Behat\Behat\Context\Context; |
9 | 40 | use Behat\Behat\Hook\Scope\AfterFeatureScope; |
10 | 41 | use Behat\Behat\Hook\Scope\AfterScenarioScope; |
|
0 commit comments