Skip to content

Commit b164e45

Browse files
committed
add test
1 parent bc8c3dc commit b164e45

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/View/Blade/BladeIfAuthStatementsTest.php

+12
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ public function testIfStatementsAreCompiled()
2525
$this->assertEquals($expected, $compiler->compileString($string));
2626
}
2727

28+
public function testPlainIfStatementsAreCompiled()
29+
{
30+
$compiler = new BladeCompiler($this->getFiles(), __DIR__);
31+
$string = '@auth
32+
breeze
33+
@endauth';
34+
$expected = '<?php if(auth()->guard()->check()): ?>
35+
breeze
36+
<?php endif; ?>';
37+
$this->assertEquals($expected, $compiler->compileString($string));
38+
}
39+
2840
protected function getFiles()
2941
{
3042
return m::mock('Illuminate\Filesystem\Filesystem');

0 commit comments

Comments
 (0)