yii2: codeception API test failed after upgrade to 2.0.14
for all my tests on sending request it failed
Headers already sent in /home/ramin/.config/composer/vendor/phpunit/phpunit/src/Util/Printer.php on line 112.
/www/project/backend/vendor/yiisoft/yii2/web/Response.php:366
/www/project/backend/vendor/yiisoft/yii2/web/Response.php:339
/www/project/backend/vendor/symfony/browser-kit/Client.php:312
/www/project/backend/api/tests/_support/_generated/ApiTesterActions.php:370
/www/picontest/backend/api/tests/api/ChangePasswordCept.php:7
this is ChangePasswordCept.php
<?php
use api\tests\ApiTester;
$I = new ApiTester($scenario, true);
$I->wantTo('Change Password By Old Password.');
$I->haveHttpHeader('Accept', 'application/json; version=v1.0');
$I->sendPUT('/change-password', [
'email' => 'email@gmail.com',
'oldPassword'=>'password_0',
'password'=>'password_1'
]);
$I->grabResponse();
$I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
| Q | A |
|---|---|
| Yii version | 2.0.14 |
| PHP version | 7.2 |
| Operating system | Debian 9 |
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (13 by maintainers)
Add below code to end of
_bootstrap.phpthis issue
Headers already sent...has been reproduced. see https://github.com/yiisoft/yii2/issues/15698#issuecomment-368193947I suggest making commit https://github.com/yiisoft/yii2/commit/28e7f31a37866d899c77a80d15a8c2676aff0771 as a BC breaking change