I'm testing a form where user must introduce some text between let's say 100 and 500 characters.
I tried to emulate the user input:
$this->actingAs($user)
->visit('myweb/create')
->type($this->faker->text(1000),'description')
->press('Save')
->see('greater than');
But it seems that faker is creating a quite smaller text so the test does not pass.
In fact, the param specifies the max number of characters, not the minimum. How can I tell faker the minimum?
Aucun commentaire:
Enregistrer un commentaire