/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/View/Blade/BladeIfAuthStatementsTest.php
28 строк
673 B
Lucas Michot
Simplify Blade tests.
07 авг 2019, 21:14
Не верифицирован
07 авг 2019, 21:14
3b67d44
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\View\Blade; class BladeIfAuthStatementsTest extends AbstractBladeTestCase { public function testIfStatementsAreCompiled() { $string = '@auth("api") breeze @endauth'; $expected = '<?php if(auth()->guard("api")->check()): ?> breeze <?php endif; ?>'; $this->assertEquals($expected, $this->compiler->compileString($string)); } public function testPlainIfStatementsAreCompiled() { $string = '@auth breeze @endauth'; $expected = '<?php if(auth()->guard()->check()): ?> breeze <?php endif; ?>'; $this->assertEquals($expected, $this->compiler->compileString($string)); } }