php - 密码错误 | 未找到“Yii”类
问题描述
您好,我创建了一个新项目来学习代码接收。
但是当我运行“codecept run”时,我得到以下错误:
打开联系页面 (ContactFormCest::openContactPage) [Symfony\Component\Debug\Exception\FatalThrowableError] 找不到类“Yii”
我的引导文件:
?php
define(‘YII_ENV’, ‘test’);
defined(‘YII_DEBUG’) or define(‘YII_DEBUG’, true);
require(DIR . “/…/vendor/autoload.php”);
require(DIR . “/…/vendor/yiisoft/yii2/Yii.php”);
$config = require(__DIR__ . '/../config/console.php');
$application = new yiiconsoleApplication( $config );
我的codeception.yml:
actor: Tester
bootstrap: _bootstrap.php
paths:
tests: tests
log: tests/_output
data: tests/_data
helpers: tests/_support
settings:
memory_limit: 1024M
colors: true
modules:
config:
Yii2:
configFile: 'config/test.php'
解决方案
推荐阅读
- python - Astropy Cutout2D,引发 ValueError
- delphi - 当什么都没有发生时,为什么我会在数据模块中遇到访问冲突?
- c - 为什么在很多地方 *p() 被称为返回指针的函数而不是返回地址的函数?
- java - Android Path - 通过X轴值获取特定点的坐标
- javascript - 在 async.filter() 数组 nodejs 中获取异步结果
- excel - 使用 VBA 打印外部 Excel 文件
- bash - 如何在一个循环中只运行一个步骤?
- python - 为什么“try...else”在 Python 中是“无效语法”?
- apache-spark - Spark 2.3.1 错误 AsyncEventQueue:70 - 从队列 appStatus 中删除事件
- ffmpeg - ffmpeg 2在aws Lamba上通过编码