mercredi 2 août 2017

How to write UNIT-test for this PHP code on Laravel?

How to test this function?

public function destroy(Post $post)
{
    $post->delete();

    return Response::json([], ResponseHttp::HTTP_OK);
}

I know that I must create several post delete it, but how it test?

Aucun commentaire:

Enregistrer un commentaire