Skip to content

Commit 1508cc3

Browse files
committed
update @user test style
1 parent 40a6dcc commit 1508cc3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tests/DirectivesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function testEndCountDirective()
4848

4949
public function testUserDirective()
5050
{
51-
$this->assertEquals("<?php echo \auth()->user()->name; ?>", $this->compiler->compileString("@user('name')"));
51+
$this->assertEquals("<?php if(\auth()->check()): echo \auth()->user()->name; endif; ?>", $this->compiler->compileString("@user('name')"));
5252
}
5353

5454
}

tests/views/user.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@user('name')

0 commit comments

Comments
 (0)