Код: Выделить всё
./codecept.phar run
Codeception PHP Testing Framework v2.0.3
Powered by PHPUnit 4.1.4 by Sebastian Bergmann.
Unit Tests (3) --------------------------------------------------------------------------------------------------------------------------------
Trying to test login no user (common\tests\unit\models\LoginFormTest::testLoginNoUser)
PHP Fatal Error 'yii\base\ErrorException' with message 'Call to undefined function common\tests\unit\models\expect()'
in .../common/tests/unit/models/LoginFormTest.php:44
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}
Код: Выделить всё
$this->specify('user should not be able to login, when there is no identity', function () use ($model) {
expect('model should not login user', $model->login())->false();
expect('user should not be logged in', Yii::$app->user->isGuest)->true();
});
Что я ещё упустил?