mercredi 10 octobre 2018

PhpUnit Assert if string contains on numeric characters

Just wondering on how to test if a string contains on numeric characters.

I tried

$testdata = [           
   'ver'  => '087'
];

$this->assertRegExp('/0-9/',$testdata['ver']);

but the above fails.

Aucun commentaire:

Enregistrer un commentaire