/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/View/Blade/BladeIfStatementsTest.php
56 строк
853 B
Taylor Otwell
fix case
26 июн 2017, 05:07
26 июн 2017, 05:07
8485fe0
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\View\Blade; class BladeIfStatementsTest extends AbstractBladeTestCase { public function testIfStatementsAreCompiled() { $string = '@if (name(foo(bar))) breeze @endif'; $expected = '<?php if(name(foo(bar))): ?> breeze <?php endif; ?>'; $this->assertEquals($expected, $this->compiler->compileString($string)); } public function testSwitchstatementsAreCompiled() { $string = '@switch(true) @case(1) foo @case(2) bar @endswitch foo @switch(true) @case(1) foo @case(2) bar @endswitch'; $expected = '<?php switch(true): case (1): ?> foo <?php case (2): ?> bar <?php endswitch; ?> foo <?php switch(true): case (1): ?> foo <?php case (2): ?> bar <?php endswitch; ?>'; $this->assertEquals($expected, $this->compiler->compileString($string)); } }