Skip to content
Permalink
Browse files

remove path hint

  • Loading branch information...
taylorotwell committed Apr 4, 2019
1 parent 0207d73 commit 33ce7bbb6a7f536036b58b66cc760fbb9eda80de
Showing with 4 additions and 8 deletions.
  1. +0 −4 src/Illuminate/View/Compilers/BladeCompiler.php
  2. +4 −4 tests/View/ViewBladeCompilerTest.php
@@ -122,10 +122,6 @@ public function compile($path = null)
$this->files->get($this->getPath())
);
if (! empty($this->getPath())) {
$contents .= "\n<?php /* {$this->getPath()} */ ?>";
}
$this->files->put(
$this->getCompiledPath($this->getPath()), $contents
);
@@ -49,15 +49,15 @@ public function testCompileCompilesFileAndReturnsContents()
{
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
$files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World');
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World\n<?php /* foo */ ?>");
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World");
$compiler->compile('foo');
}
public function testCompileCompilesAndGetThePath()
{
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
$files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World');
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World\n<?php /* foo */ ?>");
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World");
$compiler->compile('foo');
$this->assertEquals('foo', $compiler->getPath());
}
@@ -73,7 +73,7 @@ public function testCompileWithPathSetBefore()
{
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
$files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World');
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World\n<?php /* foo */ ?>");
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World");
// set path before compilation
$compiler->setPath('foo');
// trigger compilation with null $path
@@ -97,7 +97,7 @@ public function testIncludePathToTemplate()
{
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
$files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World');
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World\n<?php /* foo */ ?>");
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('foo').'.php', "Hello World");
$compiler->compile('foo');
}

0 comments on commit 33ce7bb

Please sign in to comment.
You can’t perform that action at this time.