BladeElseIfStatementsTest.php 453 B

123456789101112131415161718192021
  1. <?php
  2. namespace Illuminate\Tests\View\Blade;
  3. class BladeElseIfStatementsTest extends AbstractBladeTestCase
  4. {
  5. public function testElseIfStatementsAreCompiled()
  6. {
  7. $string = '@if(name(foo(bar)))
  8. breeze
  9. @elseif(boom(breeze))
  10. boom
  11. @endif';
  12. $expected = '<?php if(name(foo(bar))): ?>
  13. breeze
  14. <?php elseif(boom(breeze)): ?>
  15. boom
  16. <?php endif; ?>';
  17. $this->assertEquals($expected, $this->compiler->compileString($string));
  18. }
  19. }