Closed ua2004 closed 9 years ago
OK, I simply took line 11 in index-test.php
and inserted it after line 15:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Definitions
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
defined('YII_DEBUG') or define('YII_DEBUG',true);
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
// Load Yii and Composer extensions
require_once __DIR__.DS.'vendor'.DS.'yiisoft'.DS.'yii'.DS.'framework'.DS.'yii.php';
require_once __DIR__.DS.'vendor'.DS.'autoload.php';
// Load the config files
$config = require __DIR__.DS.'protected'.DS.'config'.DS.'test.php';
// Return for Codeception
return array(
'class' => 'CWebApplication',
'config' => $config,
);
Now CMap
class is loaded automatically before config/test.php
file is included.
I installed Codeception 1.8 and YiiBridge following the instructions. This is my
index-test.php
:Here is
config/test.php
:Of course, I have imported
CodeceptionHttpRequest
class inconfig/main.test
. But whenever I run any tests (unit or acceptance) I get the following error: