Answer the question
In order to leave comments, you need to log in
API testing codeception+Yii2. How to specify another base for the test?
Can you please tell me how to set up the execution of API tests with a test base?
$I = new ApiTester($scenario);
$I->wantTo('Get something');
$I->sendGET('somethings');
$I->seeResponseIsJson();
$I->seeResponseCodeIs(200);
Answer the question
In order to leave comments, you need to log in
Of course, I'm a beginner and don't understand much... but isn't it easier to temporarily rewrite the db.php file in api/config/requires?
Well, like pushed aside and returned everything back. I have this in the file
// 'dsn' => 'mysql:host="бла бла.ком";dbname=tor',
// 'username' => 'tor',
// 'password' => '',
// 'charset' => 'utf8',
'dsn' => 'mysql:host=127.0.0.1;dbname=tor',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question