i wanna do something test.
this is my code.
public function tryToTest(ApiTester $I)
{
//$I->amHttpAuthenticated('service_user', '123456');
//$I->haveHttpHeader('Content-Type', 'application/x-www-form-urlencoded');
$url = '/Persons/hi';
$params = [];
$I->sendGET($url,$params);
$I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK); // 200
$I->seeResponseContains('HI');
}
but i always get action sendGET cant be called
any config i miss to do?
Provide console output if related. Use
-vvvmode for more details.
# paste output here
Provide test source code if related
// paste test
composer show)This is my suite config :
actor: ApiTester
modules:
enabled: [Helper\Api, PhpBrowser, REST, Db]
config:
PhpBrowser:
url: '127.0.0.1/'
REST:
depends: PhpBrowser
url: '127.0.0.1/'
Db:
dsn: 'mysql:host=127.0.0.1;port=3306;dbname=test'
user: 'root'
password: 'secret'
Run codecept build and see if it helps.
Also you missed protocol in urls.
No reaction on issue. Closing
Most helpful comment
Run
codecept buildand see if it helps.Also you missed protocol in urls.