php - @dataProvider in Cest format in Codeception -
how shall use "@dataprovider" in cest format? (http://codeception.com/docs/05-unittests#cest) example have code. how write in cest format
class exampletest extends \codeception\testcase\test { /** * @dataprovider provideradd */ public function testadd($a, $b, $c) { $this->assertequals($c, ($a + $b)); } public function provideradd() { return array ( array (2, 2, 4), array (2, 3, 5), array (3, 5, 8) ); } }
the @dataprovdier annotation works me in codeception docs on website (or docs/07-advancedusage.md) - please note annotation case sensitive @dataprovdier not @dataprovdier.
Comments
Post a Comment