I am having some problems with Codeception using Yii2. I just upgraded to Yii 2.0.10 and have been using this guide
I am getting the error: Codeception\Test\Unit not found in vendor\codeception\base\shim.php. If I ocmment this class out, the next one fails which is:
namespace Codeception\Module {
class Symfony2 extends Symfony {
}
This is what've done: I created a file test.php and put it in my config folder:
<?php
// config/test.php
$config = yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/main.php'),
require(__DIR__ . '/main-local.php'),
[
'id' => 'app-tests',
'components' => [
'db1' => require(__DIR__ . '/db.php'),
]
]
);
return $config;
codeception.yaml
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'
unit.suite.yml
class_name: UnitTester
modules:
enabled:
- Asserts
- Yii2:
part: [orm, email]
I'm completely new to Codeception, so not sure what I've done wrong