Answer the question
In order to leave comments, you need to log in
How to get access_token before running tests?
I am learning to write tests. I'm trying to test the REST api.
Before the tests, you need to get an access_token and pass it to the amBearerAuthenticated method.
I created my helper and wrote the following:
public function _before()
{
$I = $this->getModule('REST');
// get token
$I->amBearerAuthenticated($token);
}
PHP Fatal error: Call to a member function request() on null in phar:///usr/local/bin/codecept/src/Codeception/Module/REST.php
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question