You are here

forena.test in Forena Reports 7.5

Same filename in this branch
  1. 7.5 forena.test
  2. 7.5 tests/forena.test
Same filename and directory in other branches
  1. 7.3 forena.test
  2. 7.4 forena.test

tests Tests for forena. @author davidmetzler

File

forena.test
View source
<?php

/**
 * @file tests
 * Tests for forena.
 * @author davidmetzler
 *
 */
class ForenaReportTestCase extends DrupalWebTestCase {
  public $privileged_user;
  public static function getInfo() {
    return array(
      'name' => 'Forena Reports',
      'description' => 'Report rendering tests for forena',
      'group' => t('Forena'),
    );
  }
  public function setup() {
    parent::setup('forena');

    // Create and log in our privileged user.
    $this->privileged_user = $this
      ->drupalCreateUser(array(
      'access sampledb data',
      'administer forena reports',
      'list reports',
    ));
    $this
      ->drupalLogin($this->privileged_user);
  }

  /**
   * Test basic Forena Report.
   */
  public function testConfig() {
    $this
      ->drupalGet('forena');
    $this
      ->drupalGet('reports/sample.states');
    $this
      ->assertText('Simple Table');
    $this
      ->assertText('Alaska');
  }

}

Classes

Namesort descending Description
ForenaReportTestCase @file tests Tests for forena. @author davidmetzler