title: How to access static property of Laravel Controller in PhpSpec?
body: <p>I am trying to write a class which will read the routes given by the constructor it's constructed with. However, even after 1h of googling I didn't find anything how to access the <code>getRouter</code> method of the Laravel Controller - because <a href="https://github.com/illuminate/routing/blob/5.2/Controller.php#L55" rel="nofollow">it's a static function</a>. 
  I've tried many things but most of the time I got following error:</p>
  
  <blockquote>
    <p>Uncaught Error: Using $this when not in object context in<br>
    vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php(49) :<br>
    eval()'d code:13<br>
    Stack trace:
     #0 [internal function]: Double\Illuminate\Routing\Controller\P4::getRouter()</p>
  </blockquote>
  
  <p>How can I achieve this or is this just not possible with PhpSpec?</p>
  
  <p>My Spec:</p>
  
  <pre><code>use Illuminate\Routing\Controller;
  use PhpSpec\ObjectBehavior;
  use Prophecy\Argument;
  
  class OptionDescriberSpec extends ObjectBehavior
  {
  
      function let(Controller $controller)
      {
        $this-&gt;beConstructedWith($controller);
      }
  
      function it_should_read_the_aviable_routes_of_the_controller()
      {
          $this-&gt;getController()-&gt;getRouter()-&gt;shouldReturn('Router');
          $this-&gt;render()-&gt;shouldReturn('Router');
      }
  }
  </code></pre>
  
  <p>My Class:</p>
  
  <pre><code>use Illuminate\Routing\Controller;
  
  class OptionDescriber
  {
  
      /**
       * @var Controller
       */
      protected $controller;
  
      /**
       * OptionDescriber constructor.
       *
       * @param Controller $controller
       */
      public function __construct(Controller $controller)
      {
          $this-&gt;controller = $controller;
      }
  
      public function render()
      {
          return $this-&gt;controller-&gt;getRouter();
      }
  }
  </code></pre>