make(\'foo\', \Illuminate\Support\Arr::except(get_defined_vars(), [\'__data\', \'__path\']))->render(); ?>'; $this->assertEquals($expected, $this->compiler->compileString($string)); $string = '@extends(name(foo))'."\n".'test'; $expected = "test\n".'make(name(foo), \Illuminate\Support\Arr::except(get_defined_vars(), [\'__data\', \'__path\']))->render(); ?>'; $this->assertEquals($expected, $this->compiler->compileString($string)); } public function testSequentialCompileStringCalls() { $string = '@extends(\'foo\') test'; $expected = "test\n".'make(\'foo\', \Illuminate\Support\Arr::except(get_defined_vars(), [\'__data\', \'__path\']))->render(); ?>'; $this->assertEquals($expected, $this->compiler->compileString($string)); // use the same compiler instance to compile another template with @extends directive $string = "@extends(name(foo))\ntest"; $expected = "test\n".'make(name(foo), \Illuminate\Support\Arr::except(get_defined_vars(), [\'__data\', \'__path\']))->render(); ?>'; $this->assertEquals($expected, $this->compiler->compileString($string)); } }