getFiles(), __DIR__); $this->assertEquals('', $compiler->compileString('@assign($foo, \'bar\')')); $this->assertEquals('', $compiler->compileString('@assign($foo, $bar)')); } public function testExtensionEventsAreCompiled() { $compiler = new FeatherCompiler($this->getFiles(), __DIR__); $expected = ''; $this->assertEquals($expected, $compiler->compileString('@event(\'foo\')')); } public function testInlineErrorsAreCompiled() { $compiler = new FeatherCompiler($this->getFiles(), __DIR__); $expected = 'has(\'foo\') ? view("feather::errors.inline", array("error" => $errors->first(\'foo\'))) : null; ?>'; $this->assertEquals($expected, $compiler->compileString('@error(\'foo\')')); } public function testErrorsAreCompiled() { $compiler = new FeatherCompiler($this->getFiles(), __DIR__); $expected = 'all() ? view("feather::errors.page", array("errors" => $errors->all())) : null; ?>'; $this->assertEquals($expected, $compiler->compileString('@errors')); } public function getFiles() { return m::mock('Illuminate\Filesystem'); } }