我正在尝试访问主页并单击我的按钮
<a href="{{route('quiz.create')}}" id="createQuiz" class="crud-btn">createQuiz</a>
我做了一个测试来做那个
public function testExample()
{
$this->visit('/home')->click('createQuiz');
}
然而,当我用
运行测试时phpunit --filter quizCreation "tests\quizCreation"
我收到错误 ... quizWhiz /供应商/ laravel /框架/ src目录/照亮/基金/测试/关注/ INTERAC tsWithPages.php:464
InvalidArgumentException: Could not find a link with a body, name, or ID attribute of [createQuiz].