php - Unknown method ApiTester::sendGet with Codeception -
i'm trying setup codeception tests test api i'm building seem doing wrong.
following tutorial* have run php codecept.phar generate:suite api creates ./tests/api.suite.yml file looks this:
class_name: apitester modules: enabled: - \helper\api i modified file same 1 in tutorial (adding url) this:
class_name: apitester modules: enabled: - rest: url: http://serviceapp/api/v1/ depends: phpbrowser and generate test script generate:cept api readuser , add tests such
<?php $i = new apitester($scenario); $i->wantto('perform actions , see result'); $i->sendget('/user/1'); however when run test error call undefined method apitester::sendget
what need add have methods sendget, sendpost , others available?
the codeception version 2.1.5
*http://codeception.com/docs/10-webservices
fixed: removed tests directory , started again , working now. not sure different. yii2 build tests path maybe did different.
it's important pay attention upper , lower case writing. name of method $i->sendget() (uppercase get).
try this
<?php $i = new apitester($scenario); $i->wantto('perform actions , see result'); $i->sendget('/user/1');
Comments
Post a Comment