FrxXMLTest.php in Forena Reports 8
File
tests/src/Unit/Renderer/FrxXMLTest.php
View source
<?php
namespace Drupal\Tests\forena\Unit\Renderer;
use Drupal\forena\Report;
use Drupal\Tests\forena\Unit\FrxTestCase;
class FrxXMLTest extends FrxRendererTestCase {
private $doc = '<?xml version="1.0"?>
<!DOCTYPE root [
<!ENTITY nbsp " ">
]>
<html xmlns:frx="urn:FrxReports">
<head>
<title>Report Title</title>
<frx:category>Category</frx:category>
<frx:fields>
</frx:fields>
</head>
<body>
<div renderer="FrxXML"></div>
</body>
</html>';
public function testFrxXML() {
$data = $this
->dataManager()
->data('test/simple_data');
$this
->pushData($data);
$output = $this
->render('\\Drupal\\forena\\FrxPlugin\\Renderer\\FrxXML', $this->doc);
$this
->popData();
$this
->assertContains('<col1>data</col1>', $output, 'Rendered Control contains column data');
}
}