Codeception: action sendGET Cant be called

Created on 16 Aug 2018  路  2Comments  路  Source: Codeception/Codeception

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 -vvv mode for more details.

# paste output here

Provide test source code if related

// paste test

Details

  • Codeception version:2.45
  • PHP Version:7
  • Operating System:OS
  • Installation type: Composer
  • List of installed packages (composer show)
  • Suite configuration:

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'

Most helpful comment

Run codecept build and see if it helps.
Also you missed protocol in urls.

All 2 comments

Run codecept build and see if it helps.
Also you missed protocol in urls.

No reaction on issue. Closing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

centerax picture centerax  路  4Comments

maxibello picture maxibello  路  3Comments

sasha-x picture sasha-x  路  3Comments

allen0817 picture allen0817  路  3Comments

rogoit picture rogoit  路  3Comments