FrxTitleTest.php in Forena Reports 8
File
tests/src/Unit/Renderer/FrxTitleTest.php
View source
<?php
namespace Drupal\Tests\forena\Unit\Renderer;
use Drupal\forena\Report;
use Drupal\Tests\forena\Unit\FrxTestCase;
class FrxTitleTest 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="FrxTitle">Overridden Title</div>
</body>
</html>';
public function testFrxXML() {
$output = $this
->render('\\Drupal\\forena\\FrxPlugin\\Renderer\\FrxTitle', $this->doc);
$this
->assertEquals('Overridden Title', $this->report->title);
}
}