Example #1
0
 /** @test */
 public function it_generates_url_to_auth()
 {
     $this->shouldReceiveAnyOther();
     $this->instance->registerRoutes();
     $this->urlGenerator->shouldReceive('route')->with('test-prefix.login')->once()->andReturn('some-route');
     $this->urlGenerator->shouldReceive('route')->with('test-prefix.login.post')->once()->andReturn('some-route');
     $this->urlGenerator->shouldReceive('route')->with('test-prefix.logout')->once()->andReturn('some-route');
     $route = $this->instance->routeToAuth('login');
     $this->assertEquals('some-route', $route);
     $route = $this->instance->routeToAuth('login.post');
     $this->assertEquals('some-route', $route);
     $route = $this->instance->routeToAuth('logout');
     $this->assertEquals('some-route', $route);
 }
Example #2
0
 /**
  * 
  *
  * @param $action
  * @return string 
  * @static 
  */
 public static function routeToAuth($action)
 {
     return \SleepingOwl\Admin\Router::routeToAuth($action);
 }