$response = $this->call('GET','abc?foo=bar');
I'm unable to get PHPUnit to transmit foo as a request variable. Any thoughts? Am I missing something?
Your issue is not a PHPUnit issue, it is a Laravel one.
The call() method has the following signature:
call($method, $uri, $parameters = [], $cookies = [], $files = [], $server = [], $content = null);
You should send the query string as an associative array.
If you want to directly test a controller, you should use the action() method, which has the following signature:
action($method, $action, $wildcards = [], $parameters = [], $cookies = [], $files = [], $server = [], $content = null)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With