mardi 12 janvier 2021

Test the view that is showing after authorisation

I am learning how to do simple tests on my application. Simply, I dont know how to get over the problem below.

Problem

I am just trying to see, if my page is loading correctly by checking if site contain word "Send". Send is my button that is located in my view.

How can I check the view as a logged user?

My test function:

public function testSiteIsLoadingCorrectly()
{
    $response = $this->get('/homepage');
    $response->assertSee("Send");
}

Aucun commentaire:

Enregistrer un commentaire