コード例 #1
0
ファイル: RouterTest.php プロジェクト: GlobalsDD/admin
 /** @test */
 public function it_generates_url_to_asset()
 {
     $this->shouldReceiveAnyOther();
     $this->instance->registerRoutes();
     $this->urlGenerator->shouldReceive('asset')->with('packages/sleeping-owl/admin/min.js')->once()->andReturn('some-route');
     $this->urlGenerator->shouldReceive('asset')->with('packages/sleeping-owl/admin/subdir/min.css')->once()->andReturn('some-route');
     $route = $this->instance->routeToAsset('min.js');
     $this->assertEquals('some-route', $route);
     $route = $this->instance->routeToAsset('subdir/min.css');
     $this->assertEquals('some-route', $route);
 }
コード例 #2
0
 /**
  * 
  *
  * @param string $asset
  * @return string 
  * @static 
  */
 public static function routeToAsset($asset)
 {
     return \SleepingOwl\Admin\Router::routeToAsset($asset);
 }