Код: Выделить всё
[yii\base\UnknownPropertyException] Getting unknown property: yii\web\Application::queue
Код: Выделить всё
<?php
$params = array_merge(
require(__DIR__ . '/params.php'),
require(__DIR__ . '/params-local.php')
);
/**
* Application configuration shared by all test types
*/
$config = [
'id' => 'mysite-tests',
'basePath' => dirname(__DIR__),
'language' => 'ru-RU',
// 'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
// 'bootstrap' => [],
'components' => [
'queue' => [
'class' => \zhuravljov\yii\queue\redis\Queue::class,
'redis' => 'redis',
'channel' => 'queue',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
],
],
'user' => [
'identityClass' => 'app\models\User',
],
'request' => [
'cookieValidationKey' => 'test',
'enableCsrfValidation' => false,
'parsers' => [
'application/json' => 'yii\web\JsonParser',
]
// but if you absolutely need it set cookie domain to localhost
/*
'csrfCookie' => [
'domain' => 'localhost',
],
*/
],
],
'params' => $params,
];
return array_merge(
$config,
require(__DIR__ . '/test-local.php')
);
functional.suite.yml:
Код: Выделить всё
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
class_name: FunctionalTester
modules:
enabled:
- Filesystem
- Yii2:
entryUrl: 'http://mysite'
entryScript: 'index.php'
cleanup: true
- REST:
depends: PhpBrowser
url: 'http://mysite'
part: Json
Код: Выделить всё
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
helpers: tests/_support
settings:
bootstrap: _bootstrap.php
memory_limit: 1024M
colors: true
modules:
config:
Yii2:
configFile: 'config/test.php'
cleanup: false