/** * Fakes a template file. * * @param string $file * * @return string */ public function fakeTemplate($file) { $this->template->loadTemplate($file); $varsName = $this->template->getVariables(); $out = ''; $num = $this->num; for ($i = 0; $i < $num; $i++) { $fakeData = $this->num(1)->fake($varsName)->toArray(); $data = array_combine(array_values($varsName), $fakeData); $out .= $this->template->render($data); } return $out; }