Open YuanLianDu opened 7 years ago
单元测试文件,现在不能引入外部的类了吗?引入就会报错,这个外部的类是自己封装的:
[TypeError] Argument 1 passed to PHPUnit_Framework_TestCase::onNotSuccessfulTest() must be an instance of Exception, instance of Error given, called in C:\Users\qiutianjia\AppData\Roaming\Composer\vendor\phpunit\phpunit\src\Fra mework\TestCase.php on line 851
不去引入的话运行测试文件就是正常的。开发环境:php7,yii2,codecept2.1,win10
PHP 的 built-in web server 有个
-t
参数可以指定 document root 的路径的,比如这里就可以写成:这样就能省掉 URL 中的
/web/index.php
这部分了。