/** * @param string $name * @param array $vars * @return string */ protected function renderBlock($name, array $vars = []) { $template = $this->theme->loadTemplateFor($name); ob_start(); $template->displayBlock($name, $vars, $this->theme->blocks()); return ob_get_clean(); }
function it_should_render_the_closing_tag_of_a_form(FormTheme $theme, Template $template) { $theme->loadTemplateFor('form_end')->willReturn($template); $theme->blocks()->willReturn([]); $this->renderFormEnd(); $template->displayBlock('form_end', [], [])->shouldHaveBeenCalled(); }