PHPUnit says route not defined (Laravel)
<p>I run a unit-test on routing. Funny thing is: PHPUnit says "all good" for the <strong>first test in a test file</strong>, but fails with <strong>"route not defined"</strong> for <strong>exactly</strong> the same test if it only goes <strong>second</strong> in the file.</p>

<p>I tried to create dummy test with only</p>

<pre><code>$this-&gt;assertTrue(true);
</code></pre>

<p>and put is as a first test, the second test doing some work, precisely:</p>

<pre><code>$this-&gt;call('GET', "http:....."); 
$this-&gt;assertRedirectedToRoute('login');
</code></pre>

<p>and it fails.</p>

<p>But this same test gives me success if it goes first in the file. Very strange.</p>

<p>Does anyone know why is it happening?</p>