lundi 24 avril 2017

laravel test issue-> for index controller function

how be the unit test format for this type of code in laravel ? this is belong to function index in controller

$data = Data
      ::where('client_id', $this->client->id)
        ->paginate(10);

how i can do test for this part of code ?

i did this

// public function testIndex()
// {     

// $response = $this->call('GET', '/backend/route-data'); // $this->assertEquals(302, $response->status());

// }

but i dont know how to do upper code



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire