简体   繁体   English

非测试的Codeception公共方法

[英]codeception public methods that are not tests

codeception treats every public method as a test. 编码接受将所有公共方法都视为一种测试。 However I have a method that I need to be public. 但是,我有一种需要公开的方法。 However, it is not a test. 但是,这不是测试。 Can I somehow annotate it to tell codeception that it should not be run as a test? 我可以以某种方式注释它以告诉代码接受不应将其作为测试运行吗?

You can start the function with an underscore to let Codeception know it's not a test: 您可以使用下划线启动该功能,以使Codeception知道它不是测试:

public function _after(AcceptanceTester $I)
{

} 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM