Skip to content

Commit 595257f

Browse files
committed
Update tests for EE::launch changes in core
Signed-off-by: Riddhesh Sanghvi <[email protected]>
1 parent b5821e8 commit 595257f

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

features/bootstrap/FeatureContext.php

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,41 @@
11
<?php
22

3-
include_once(__DIR__ . '/../../php/class-ee.php');
4-
include_once(__DIR__ . '/../../php/utils.php');
3+
define('EE_ROOT',__DIR__ . '/../..');
54

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' ) ) );
611
define( 'EE_CONF_ROOT', '/opt/easyengine' );
712

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+
839
use Behat\Behat\Context\Context;
940
use Behat\Behat\Hook\Scope\AfterFeatureScope;
1041
use Behat\Behat\Hook\Scope\AfterScenarioScope;

0 commit comments

Comments
 (0)