Exemplo n.º 1
0
 function it_renders_data_with_given_configuration(ReportInterface $report, Data $reportData, $templating)
 {
     $reportData->getLabels()->willReturn(array('month', 'user_total'));
     $reportData->getData()->willReturn(array('month1' => '50', 'month2' => '40'));
     $renderData = array('report' => $report, 'values' => array('month1' => '50', 'month2' => '40'), 'labels' => array('month', 'user_total'), 'fields' => array('month1', 'month2'));
     $report->getRendererConfiguration()->willReturn(array('template' => 'SyliusReportBundle:Table:default.html.twig'));
     $templating->render('SyliusReportBundle:Table:default.html.twig', array('data' => $renderData, 'configuration' => array('template' => 'SyliusReportBundle:Table:default.html.twig')))->willReturn('<div>Table Report</div>');
     $this->render($report, $reportData)->shouldReturn('<div>Table Report</div>');
 }