MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/artinside/public_html/lhh/vendor/league/plates/test/integration/layout-sections.spec.php
<?php

use League\Plates;

describe('Layout Sections Extension', function() {
    beforeEach(function() {
        $this->plates = Plates\Engine::createWithConfig([
            'base_dir' => __DIR__ . '/fixtures/default-layout',
            'default_layout_path' => './_layout',
        ]);
    });
    it('allows default layout on the root template', function() {
        $html = <<<html
<div>
    <div>main - partial</div>
</div>

html;
        expect($this->plates->render('main'))->equal($html);
    });
    it('excludes any templates with no_layout attribute', function() {
        $html = <<<html
<div>main - partial</div>

html;
        expect($this->plates->render('main', [], ['no_layout' => true]))->equal($html);
    });
    it('allows an override of the default layout', function() {
        $html = <<<html
<p>
    <div>main - partial</div>
</p>

html;
        expect($this->plates->render('main', ['override' => true]))->equal($html);
    });
});