<p>In CakePHP putting a querystring in the url doesn't cause it to be automatically parsed and split like it normally is when the controller is directly invoked. </p>

<p>For example:</p>

<pre><code>$this-&gt;testAction('/testing/post?company=utCompany', array('return' =&gt; 'vars')) ;
</code></pre>

<p>will result in:</p>

<pre><code>[url] =&gt; /testing/post?company=utCompany
</code></pre>

<p>While invoking the url directly via the web browser results in:</p>

<pre><code>[url] =&gt; Array
    (
        [url] =&gt; testing/post
        [company] =&gt; utCompany
    )
</code></pre>

<p>Without editing the CakePHP source, is there some way to have the querystring split when running unit tests?</p>

I have what is either a hack (i.e. may not work for future CakePHP releases) or an undocumented feature.
If the second testAction parameter includes an named array called 'url' then the values will be placed in the $this->params object in the controller. This gives us the same net result as when the controller is directly invoked.
```
```
$data = array ('company' => 'utCompany') ;

$result = $this->testAction('/testing/post', array
(
    'return' => 'vars', 
    'method' => 'get', 
    'url' => $data)
) ;
```
```
I'm satisfied with this method for what I need to do. I'll open the question to the community shortly so that it in the future a better answer can be provided.