Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jul 19, 2017
1 parent bc8c3dc commit b164e45
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/View/Blade/BladeIfAuthStatementsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ public function testIfStatementsAreCompiled()
$this->assertEquals($expected, $compiler->compileString($string));
}

public function testPlainIfStatementsAreCompiled()
{
$compiler = new BladeCompiler($this->getFiles(), __DIR__);
$string = '@auth
breeze
@endauth';
$expected = '<?php if(auth()->guard()->check()): ?>
breeze
<?php endif; ?>';
$this->assertEquals($expected, $compiler->compileString($string));
}

protected function getFiles()
{
return m::mock('Illuminate\Filesystem\Filesystem');
Expand Down

0 comments on commit b164e45

Please sign in to comment.