codeception, cest classes and usersteps -
i impression codeception documentation outdated.
i have cept files working usersteps definition file use things login calls.
due complexity, i'd love use cest classes instead, can't them recognize usersteps. here's example:
<?php /* * @guy testguy\usersteps */ class viewpagescest { public function testviewcharacter(testguy $i) { $i->logintocharacter('admin', 'admin', 'alice kepler'); $target = $i->grabfromrepository('bm2sitebundle:character', 'id', array('name' => 'carol stanis')); $i->amonpage('/en/character/view/'.$target->getid()); $i->see($target->getname()); }
}
i get, of course:
[runtimeexception] call undefined method testguy::logintocharacter
because logintocharacter defined in usersteps file. same stuff cept file works fine. missing?
you should use docblock (t_doc_block) place @guy annotation, use comment (t_comment).
just add second star @ beginning of comment:
/** * @guy testguy\usersteps */ class viewpagescest {
Comments
Post a Comment