vendredi 7 février 2020

How can I use codeception seeRecord function for testing contains a column?

I am using Codeception for testing a REST API developed by Laravel.

I use seeRecord method like this for testing value of a columns:

 $I->seeRecord('organisations', ['id' => $id, 'first_name' => $value]);

But what the seeRecord does is testing equality. However in some cases I need to test the contents and not the equality, something like:

WHERE columnX like %value%

It seems I can do it with the third parameter of the seeRecord which is [Part] orm while I couldn't find any documentation or sample for that.

Any idea that how can I check the record for like operator?

Aucun commentaire:

Enregistrer un commentaire