public function DocumentManagerTest::testDocumentFactory in Forena Reports 8
File
- tests/
src/ Unit/ DocumentManagerTest.php, line 26
Class
- DocumentManagerTest
- @group Forena @require module forena @coversDefaultClass \Drupal\forena\DocManager
Namespace
Drupal\Tests\forena\UnitCode
public function testDocumentFactory() {
$this
->documentManager()
->setDocument('csv');
$doc = $this
->getDocument();
$this
->assertInstanceOf('\\Drupal\\forena\\FrxPlugin\\Document\\CSV', $doc);
$this
->assertEquals('csv', $this
->documentManager()
->getDocumentType());
$this
->setDocument('drupal');
$this
->assertEquals('drupal', $this
->documentManager()
->getDocumentType());
$doc = $this
->getDocument();
$this
->assertInstanceOf('\\Drupal\\forena\\FrxPlugin\\Document\\Drupal', $doc);
}