vendredi 27 janvier 2017

Testing the numbers of rows created with Laravel

I'm making a functional test with laravel / Phpunit

What I expect is having 2 rows with championship_id = 123

But the content of each row may vary.

I only know how to check if a row exists :

$this->seeInDatabase('championship_settings',
            ['championship_id' => $championship->id,
            ]);

but I don't know how to check that there is 2 rows corresponding to criteria

Any idea how should I do it???

Aucun commentaire:

Enregistrer un commentaire