Skip to content

Commit 5c7609c

Browse files
committed
Fixed tests bootstrap
1 parent 257f003 commit 5c7609c

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

codeception.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
namespace: hipanel\tests
22
paths:
3-
tests: tests
4-
output: tests/_output
5-
data: tests/_data
6-
support: tests/_support
7-
envs: tests/_envs
3+
tests: tests
4+
output: tests/_output
5+
data: tests/_data
6+
support: tests/_support
7+
envs: tests/_envs
88
actor_suffix: Tester
99
extensions:
1010
enabled:

config/acceptance.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
return [
4-
'PARAMS_LOCATION' => dirname(__DIR__) . '/vendor/hiqdev/composer-config-plugin-output/acceptance.php',
4+
'PARAMS_LOCATION' => dirname(__DIR__, 2) . '/composer-config-plugin-output/acceptance.php',
55
'YII2_CONFIG_LOCATION' => dirname(__DIR__) . '/tests/acceptance/config/suite.php',
66

77
'COMMON_SUITE_LOCATION' => dirname(__DIR__) . '/tests/acceptance.suite.yml',

config/bootstrap.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33

44
if (!defined('WEBAPP_ROOT_DIR')) {
5-
define('WEBAPP_ROOT_DIR', dirname(__DIR__));
5+
define('WEBAPP_ROOT_DIR', dirname(__DIR__, 4));
66
}
7-
87
if (!defined('WEBAPP_VENDOR_DIR')) {
98
define('WEBAPP_VENDOR_DIR', WEBAPP_ROOT_DIR . '/vendor');
109
}

tests/_bootstrap.php

+1-9
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,4 @@
1010

1111
error_reporting(E_ALL);
1212

13-
require_once __DIR__ . '/../vendor/autoload.php';
14-
require_once __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
15-
16-
use yii\web\Application;
17-
use hiqdev\composer\config\Builder;
18-
19-
Yii::setAlias('@root', dirname(__DIR__));
20-
$config = require Builder::path('web');
21-
Yii::$app = new Application($config);
13+
require_once __DIR__ . '/../config/bootstrap.php';

0 commit comments

Comments
 (0)