Answer the question
In order to leave comments, you need to log in
Warning when running tests, how to solve?
Goodnight.
Trying to set up codeception for YII2 testing.
I made the following settings in PhpStorm
When I run tests, I get a warning
Testing started at 1:11 ...
/usr/bin/php /tmp/ide-codeception.php run --report -o "reporters: report: PhpStorm_Codeception_ReportPrinter" --no-ansi --no-interaction -c /home/slonik/localhost/www/test.loc/yii2_test/codeception.yml
PHP Warning: Declaration of PhpStorm_Codeception_ReportPrinter::writeProgress($progress): void should be compatible with PHPUnit\TextUI\ResultPrinter::writeProgress(string $progress): void in /tmp/ide-codeception_24_70.php on line 2
PHP Stack trace:
PHP 1. {main}() /tmp/ide-codeception.php:0
PHP 2. require_once() /tmp/ide-codeception.php:32
Codeception PHP Testing Framework v2.5.1
Powered by PHPUnit 7.3.5 by Sebastian Bergmann and contributors.
Running with seed:
vendor/bin/codecept run
, then everything works without this warning. Answer the question
In order to leave comments, you need to log in
This problem has been bugging me for a long time too. When I try to run any of the codeception tests (specifically for Yii2) using PHPStorm (jetBrains) built-in tools, I get the following message:
session_set_cookie_params(): Cannot change session cookie parameters when headers already sent
The solution is simple. You need to add ob_start(); in tests/_bootstrap.php Answered
in detail on Stackoverflow here: https://ru.stackoverflow.com/a/953532/241265
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question