BladeHasSectionTest.php 424 B

1234567891011121314151617
  1. <?php
  2. namespace Illuminate\Tests\View\Blade;
  3. class BladeHasSectionTest extends AbstractBladeTestCase
  4. {
  5. public function testHasSectionStatementsAreCompiled()
  6. {
  7. $string = '@hasSection("section")
  8. breeze
  9. @endif';
  10. $expected = '<?php if (! empty(trim($__env->yieldContent("section")))): ?>
  11. breeze
  12. <?php endif; ?>';
  13. $this->assertEquals($expected, $this->compiler->compileString($string));
  14. }
  15. }