ReportDefinitionTest.php in Forena Reports 8
File
forena_ui/src/Tests/ReportDefinitionTest.php
View source
<?php
namespace Drupal\forena_ui\Tests;
use Drupal\simpletest\WebTestBase;
class ReportDefinitionTest extends WebTestBase {
public static $modules = [
'forena',
'forena_ui',
];
protected $profile = 'minimal';
private $privileged_user;
public static function getInfo() {
return array(
'name' => 'Forena Reports UI',
'description' => 'Report definition tests for forena',
'group' => t('Forena'),
);
}
public function setup() {
parent::setup();
$this->privileged_user = $this
->drupalCreateUser([
'administer forena',
'list forena reports',
], 'test_admin', TRUE);
}
public function testReportDisplay() {
$this
->drupalGet('admin/structure/forena');
$this
->assertLink('Sample Reports');
}
}