是否可以访问验收类中的comment()方法?
我在Acceptance.php中有一个助手方法,在这个方法中我尝试使用comment()方法,但是它总是以“未定义”的形式返回,我尝试了这些方法,但都没有用
$this->getModule('WebDriver')->comment('hai');
$I->comment('hai!');
$this->comment('hai!');
$obj = $this->getModule('Asserts');
$obj->comment('hai');
$webDriver->comment('hai');
$webDriver->browser->comment('hai');
$this->browser->comment('hai');
$webDriver->_comment('hai');一个人是怎么做到的?
我可以将$I作为参数传递给该方法,但难道没有更优雅的方法吗?
发布于 2022-01-15 03:43:28
作为解决办法,我使用了debug()方法,它执行类似的函数,但可能有人有不同的解决方案。
https://stackoverflow.com/questions/70718067
复制相似问题