mercredi 6 juin 2018

Count of rows returned by a GET with Lumen

I am testing a Lumen API

My test is basic:

    $response = $this->call('GET', '/tournaments');
    $this->assertResponseOk();

Now I would like to check how many rows did the GET call returns. Is it possible ?

I tried the $response->assertJsonCount() method available in Laravel but it is not present.

By the way, I understand Lumen is a microframework, but should I have less tools to test my app than in Laravel ? Testing would never affect my app in production.

Aucun commentaire:

Enregistrer un commentaire