title: How to get list of routes in laravel test case?
body: <p>Like the the title suggest how to get list of routes in a test case. I know that it can be done in controllers by using <code>Route::getRoutes()</code>. But, this will not work in test cases. Can somebody give me an idea on this.</p>
  
  <p>Update:</p>
  
  <p>How can I do this in test cases?</p>
  
  <pre><code>$routeCollection = Route::getRoutes();
  $routeArray = [];
  $i = 0
  foreach($routeCollection as $value) {
      $routeArray[$i++] = $value-&gt;getPath();
  }
  </code></pre>
  
  <p>Update 2:
  Like this test case. I want to get a list of route in the test case. But this does not work.</p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Foundation\Testing\WithoutMiddleware;
  use Illuminate\Foundation\Testing\DatabaseMigrations;
  use Illuminate\Foundation\Testing\DatabaseTransactions;
  
  use Laracasts\Integrated\Extensions\Selenium as IntegrationTest;
  
  class RouteTest extends IntegrationTest
  {
      /**
      * A basic test example.
      *
      * @return void
      */
      public function testExample()
      {
          $routeCollection = Route::getRoutes();
  
          foreach($routeCollection as $value) {
              $this-&gt;visit($value-&gt;getPath())
                   -&gt;onPage($value-&gt;getPath());
          }
      }
  }
  </code></pre>