public function FrxSVGGraphTest::testFrxSvgGraph in Forena Reports 8
SVGGraph
File
- tests/
src/ Unit/ Renderer/ FrxSVGGraphTest.php, line 61
Class
- FrxSVGGraphTest
- Graph test. @group Forena @require module forena @coversDefaultClass \Drupal\forena\FrxPlugin\Renderer\FrxSVGGraph
Namespace
Drupal\Tests\forena\Unit\RendererCode
public function testFrxSvgGraph() {
// Generate the crosstab
$data = $this
->dataManager()
->data('test/crosstab_data');
$this
->pushData($data);
$elements = $this
->render('\\Drupal\\forena\\FrxPlugin\\Renderer\\FrxSVGGraph', $this->doc, 'svg');
$this
->popData();
/** @var \Drupal\forena\FrxPlugin\Renderer\FrxSVGGraph $r */
$r = $this->renderer;
// Assertions
$this
->assertEquals(5, count($r->graphData));
$this
->assertEquals('8081', $r->graphData[0]['users']);
}