user = User::where('name', 'zengjun')->first(); $this->response = $this->actingAs($this->user)->get($url); } public function testHasView() { $this->response->assertStatus(200); } public function testViewHasOwners(){ $this->response->assertJson(['owners'=>Owner::all()]); } protected function tearDown(): void { parent::tearDown(); } }