generate() public method

public generate ( Fireguard\Report\Contracts\ReportContract $report )
$report Fireguard\Report\Contracts\ReportContract
Esempio n. 1
0
 public function testGenerateOnlyFooterReportFile()
 {
     $exporter = new HtmlExporter();
     $report = new Report('<section class="content">Content</section>', '', '<section class="footer">Footer</section>');
     $file = $exporter->generate($report);
     $this->assertFileExists($file);
     $expectHtml = '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>' . $exporter->getFileName() . '</title></head><body style="background-color: #ffffff;"><section class="content">Content</section><section class=\'footer\'>Footer</section></body></html>';
     $this->assertStringEqualsFile($file, $expectHtml);
 }
Esempio n. 2
0
 protected function generateHtmlWithAllReportContent(ReportContract $report)
 {
     $exporter = new HtmlExporter($this->getPath(), $this->fileName);
     return $exporter->generate($report);
 }