/** * Test the compilation of render statements. * * @group laravel */ public function testRendersAreCompiledCorrectly() { $blade1 = "@render('user.profile')"; $blade2 = "@render(Config::get('application.default_view', 'user.profile'))"; $this->assertEquals("<?php echo render('user.profile'); ?>", Blade::compile_string($blade1)); $this->assertEquals("<?php echo render(Config::get('application.default_view', 'user.profile')); ?>", Blade::compile_string($blade2)); }
/** * Test the compilation of section statements. * * @group laravel */ public function testSectionsAreCompiledCorrectly() { $blade = "@section('something')\nfoo\n@endsection"; $this->assertEquals("<?php \\Laravel\\Section::start('something'); ?>\nfoo\n<?php \\Laravel\\Section::stop(); ?>", Blade::compile_string($blade)); }