wip
This commit is contained in:
@ -4,16 +4,28 @@ return [
|
||||
'id' => 'yii2-test-console',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'aliases' => [
|
||||
'@Da/User' => dirname(dirname(dirname(__DIR__))).'/lib/User',
|
||||
'@Da/User' => dirname(dirname(dirname(__DIR__))) . '/lib/User',
|
||||
'@tests' => dirname(dirname(__DIR__)),
|
||||
],
|
||||
'components' => [
|
||||
'log' => null,
|
||||
'cache' => null,
|
||||
'db' => require __DIR__.'/db.php',
|
||||
'db' => require __DIR__ . '/db.php',
|
||||
'authManager' => [
|
||||
'class' => Da\User\Component\AuthDbManagerComponent::class,
|
||||
],
|
||||
'i18n' => [
|
||||
'translations' => [
|
||||
'usuario*' => [
|
||||
'class' => 'yii\i18n\PhpMessageSource',
|
||||
'basePath' => __DIR__ . '/../../../lib/User/resources/i18n',
|
||||
'sourceLanguage' => 'en-US',
|
||||
'fileMap' => [
|
||||
'usuario' => 'usuario.php',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'controllerMap' => [
|
||||
'migrate' => [
|
||||
|
||||
@ -5,10 +5,10 @@ return [
|
||||
'basePath' => dirname(__DIR__),
|
||||
'language' => 'en-US',
|
||||
'aliases' => [
|
||||
'@Da/User' => dirname(dirname(dirname(__DIR__))).'/lib/User',
|
||||
'@Da/User' => dirname(dirname(dirname(__DIR__))) . '/lib/User',
|
||||
'@tests' => dirname(dirname(__DIR__)),
|
||||
'@vendor' => VENDOR_DIR,
|
||||
'@bower' => VENDOR_DIR.'/bower-asset',
|
||||
'@bower' => VENDOR_DIR . '/bower-asset',
|
||||
],
|
||||
'bootstrap' => ['Da\User\Bootstrap'],
|
||||
'modules' => [
|
||||
@ -19,9 +19,9 @@ return [
|
||||
],
|
||||
'components' => [
|
||||
'assetManager' => [
|
||||
'basePath' => __DIR__.'/../assets',
|
||||
'basePath' => __DIR__ . '/../assets',
|
||||
],
|
||||
'db' => require __DIR__.'/db.php',
|
||||
'db' => require __DIR__ . '/db.php',
|
||||
'mailer' => [
|
||||
'useFileTransport' => true,
|
||||
],
|
||||
@ -32,6 +32,18 @@ return [
|
||||
'cookieValidationKey' => 'test',
|
||||
'enableCsrfValidation' => false,
|
||||
],
|
||||
'i18n' => [
|
||||
'translations' => [
|
||||
'usuario*' => [
|
||||
'class' => 'yii\i18n\PhpMessageSource',
|
||||
'basePath' => __DIR__ . '/../../../lib/User/resources/i18n',
|
||||
'sourceLanguage' => 'en-US',
|
||||
'fileMap' => [
|
||||
'usuario' => 'usuario.php',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'params' => [],
|
||||
];
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
require dirname(__DIR__).'/_bootstrap.php';
|
||||
require dirname(__DIR__) . '/_bootstrap.php';
|
||||
|
||||
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
|
||||
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
|
||||
|
||||
$config = require __DIR__.'/config/console.php';
|
||||
$config = require __DIR__ . '/config/console.php';
|
||||
|
||||
$exitCode = (new yii\console\Application($config))->run();
|
||||
exit($exitCode);
|
||||
|
||||
@ -4,17 +4,17 @@ define('YII_ENV', 'test');
|
||||
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||
|
||||
// Search for autoload, since performance is irrelevant and usability isn't!
|
||||
$dir = __DIR__.'/../';
|
||||
while (!file_exists($dir.'/vendor/autoload.php')) {
|
||||
$dir = __DIR__ . '/../';
|
||||
while (!file_exists($dir . '/vendor/autoload.php')) {
|
||||
if ($dir == dirname($dir)) {
|
||||
throw new \Exception('Failed to locate autoload.php');
|
||||
}
|
||||
$dir = dirname($dir);
|
||||
}
|
||||
|
||||
$vendor = $dir.'/vendor';
|
||||
$vendor = $dir . '/vendor';
|
||||
|
||||
define('VENDOR_DIR', $vendor);
|
||||
|
||||
require_once $vendor.'/autoload.php';
|
||||
require $vendor.'/yiisoft/yii2/Yii.php';
|
||||
require_once $vendor . '/autoload.php';
|
||||
require $vendor . '/yiisoft/yii2/Yii.php';
|
||||
|
||||
Reference in New Issue
Block a user