我的刀锋里有以下内容。
<div>
<contact-form></contact-form>
</div>我想进行测试,以确保Vue.js组件始终安装在我的测试中……
public function testRoute()
{
$this->visit('/');
//stuck here
}基本上我期待着测试刀片式服务器是否具有<contact-form>。我应该如何继续?
发布于 2018-10-09 07:10:10
您可以使用MakesHttpRequests.php特征中的call或get方法来检查文本:
// this returns \Illuminate\Foundation\Testing\TestResponse
$response = $this->get('/');
// use the TestResponse api
$response->assertSee($value);https://github.com/laravel/framework/blob/5.5/src/Illuminate/Foundation/Testing/TestResponse.php
https://stackoverflow.com/questions/52643746
复制相似问题