But the \yii\web\Request::getQueryString() method (and other parts of the Request class) searches for the $_SERVER['QUERY_STRING'] value, which is never set during tests. During normal operation of the application through the webserver, this value is available. This is resulting in failed tests for code that works fine during normal operation.
I fixed this issue on my end by adding the line;
$_SERVER['QUERY_STRING'] = $queryString;
But I'm not sure if there are any side-effects to this?
At the moment, the connector initializes the following $_SERVER properties before doing a request:
But the
\yii\web\Request::getQueryString()
method (and other parts of the Request class) searches for the$_SERVER['QUERY_STRING']
value, which is never set during tests. During normal operation of the application through the webserver, this value is available. This is resulting in failed tests for code that works fine during normal operation.I fixed this issue on my end by adding the line;
But I'm not sure if there are any side-effects to this?