You are here

public function ForenaControllerTest::testAjaxController in Forena Reports 8

Test Ajax return functions

File

tests/src/Unit/ForenaControllerTest.php, line 35

Class

ForenaControllerTest
Controller test @group Forena @require module forena @coversDefaultClass \Drupal\forena\Controller\ForenaController

Namespace

Drupal\Tests\forena\Unit

Code

public function testAjaxController() {
  $controller = new ForenaController();
  $report = $controller
    ->ajaxReport('test', 'nojs');

  // Verify the nojs case.
  $this
    ->assertArrayHasKey('report', $report);
}