我不确定Cest文件是否可以扩展。在documentation中,你可以扩展你的Cest类来分享共同的行为。但每次我尝试运行我的测试时,我都会得到类没有找到异常。
是文档错误还是我做错了什么?
现在我的基类看起来像这样。
class ServiceCest {
...
} 这个子类看起来像这样。
class CreateServiceCest extends ServiceCest {...}发布于 2016-02-15 05:58:14
您可以简单地在CreateServiceCest.php的顶部执行require_once 'ServiceCest.php';
更高级的方法是在composer.json https://getcomposer.org/doc/04-schema.md#psr-4中配置自动加载
或在_bootstrap.php http://codeception.com/docs/reference/Autoload中设置编码欺骗自动加载器
https://stackoverflow.com/questions/35386276
复制相似问题