Call require
as statment. Closes #123
This commit is contained in:
parent
02cf920ff9
commit
4dc90946e9
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$params = require(__DIR__ . '/params.php');
|
||||
$db = require(__DIR__ . '/db.php');
|
||||
$params = require __DIR__ . '/params.php';
|
||||
$db = require __DIR__ . '/db.php';
|
||||
|
||||
$config = [
|
||||
'id' => 'basic-console',
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$params = require(__DIR__ . '/params.php');
|
||||
$db = require(__DIR__ . '/test_db.php');
|
||||
$params = require __DIR__ . '/params.php';
|
||||
$db = require __DIR__ . '/test_db.php';
|
||||
|
||||
/**
|
||||
* Application configuration shared by all test types
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$db = require(__DIR__ . '/db.php');
|
||||
$db = require __DIR__ . '/db.php';
|
||||
// test database! Important not to run tests on production or development databases
|
||||
$db['dsn'] = 'mysql:host=localhost;dbname=yii2_basic_tests';
|
||||
|
||||
return $db;
|
||||
return $db;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$params = require(__DIR__ . '/params.php');
|
||||
$db = require(__DIR__ . '/db.php');
|
||||
$params = require __DIR__ . '/params.php';
|
||||
$db = require __DIR__ . '/db.php';
|
||||
|
||||
$config = [
|
||||
'id' => 'basic',
|
||||
|
@ -11,14 +11,14 @@
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'test');
|
||||
|
||||
require(__DIR__ . '/../../vendor/autoload.php');
|
||||
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
|
||||
require __DIR__ . '/../../vendor/autoload.php';
|
||||
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
|
||||
|
||||
$config = yii\helpers\ArrayHelper::merge(
|
||||
require(__DIR__ . '/../../config/console.php'),
|
||||
require __DIR__ . '/../../config/console.php',
|
||||
[
|
||||
'components' => [
|
||||
'db' => require(__DIR__ . '/../../config/test_db.php')
|
||||
'db' => require __DIR__ . '/../../config/test_db.php'
|
||||
]
|
||||
]
|
||||
);
|
||||
@ -26,4 +26,4 @@ $config = yii\helpers\ArrayHelper::merge(
|
||||
|
||||
$application = new yii\console\Application($config);
|
||||
$exitCode = $application->run();
|
||||
exit($exitCode);
|
||||
exit($exitCode);
|
||||
|
6
yii
6
yii
@ -11,10 +11,10 @@
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
defined('YII_ENV') or define('YII_ENV', 'dev');
|
||||
|
||||
require(__DIR__ . '/vendor/autoload.php');
|
||||
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
|
||||
|
||||
$config = require(__DIR__ . '/config/console.php');
|
||||
$config = require __DIR__ . '/config/console.php';
|
||||
|
||||
$application = new yii\console\Application($config);
|
||||
$exitCode = $application->run();
|
||||
|
Loading…
Reference in New Issue
Block a user