/** @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); }
/** * * * @param string $asset * @return string * @static */ public static function routeToAsset($asset) { return \SleepingOwl\Admin\Router::routeToAsset($asset); }