1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
<?php
namespace Illuminate\Tests\View\Blade;
class BladeFragmentTest extends AbstractBladeTestCase
{
public function testFragmentStartsAreCompiled()
{
$this->assertSame('<?php $__env->startFragment(\'foo\'); ?>', $this->compiler->compileString('@fragment(\'foo\')'));
$this->assertSame('<?php $__env->startFragment(name(foo)); ?>', $this->compiler->compileString('@fragment(name(foo))'));
}
public function testEndFragmentsAreCompiled()
{
$this->assertSame('<?php echo $__env->stopFragment(); ?>', $this->compiler->compileString('@endfragment'));
}
}
|