Skip to content

Commit

Permalink
Revert "[5.8] Let mix helper use assets url"
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell authored Jun 25, 2019
1 parent 7c5f0f5 commit 2184bfc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Mix.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ public function __invoke($path, $manifestDirectory = '')
}
}

return new HtmlString(app('config')->get('app.asset_url').$manifestDirectory.$manifest[$path]);
return new HtmlString($manifestDirectory.$manifest[$path]);
}
}
17 changes: 0 additions & 17 deletions tests/Foundation/FoundationHelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Illuminate\Foundation\Mix;
use PHPUnit\Framework\TestCase;
use Illuminate\Foundation\Application;
use Illuminate\Contracts\Config\Repository;

class FoundationHelpersTest extends TestCase
{
Expand Down Expand Up @@ -68,10 +67,6 @@ public function testUnversionedElixir()

public function testMixDoesNotIncludeHost()
{
$app = new Application;
$app['config'] = m::mock(Repository::class);
$app['config']->shouldReceive('get')->with('app.asset_url');

$manifest = $this->makeManifest();

$result = mix('/unversioned.css');
Expand All @@ -83,10 +78,6 @@ public function testMixDoesNotIncludeHost()

public function testMixCachesManifestForSubsequentCalls()
{
$app = new Application;
$app['config'] = m::mock(Repository::class);
$app['config']->shouldReceive('get')->with('app.asset_url');

$manifest = $this->makeManifest();
mix('unversioned.css');
unlink($manifest);
Expand All @@ -98,10 +89,6 @@ public function testMixCachesManifestForSubsequentCalls()

public function testMixAssetMissingStartingSlashHaveItAdded()
{
$app = new Application;
$app['config'] = m::mock(Repository::class);
$app['config']->shouldReceive('get')->with('app.asset_url');

$manifest = $this->makeManifest();

$result = mix('unversioned.css');
Expand All @@ -121,10 +108,6 @@ public function testMixMissingManifestThrowsException()

public function testMixWithManifestDirectory()
{
$app = new Application;
$app['config'] = m::mock(Repository::class);
$app['config']->shouldReceive('get')->with('app.asset_url');

mkdir($directory = __DIR__.'/mix');
$manifest = $this->makeManifest('mix');

Expand Down

0 comments on commit 2184bfc

Please sign in to comment.