public function EntityExportTest::testExportLinks in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_export/tests/src/Functional/EntityExportTest.php \Drupal\Tests\bibcite_export\Functional\EntityExportTest::testExportLinks()
Test export links.
@dataProvider exportDataProvider
File
- modules/
bibcite_export/ tests/ src/ Functional/ EntityExportTest.php, line 65
Class
- EntityExportTest
- Test for main export functions.
Namespace
Drupal\Tests\bibcite_export\FunctionalCode
public function testExportLinks($id, $format, $expected_result) {
$this
->drupalLogin($this->user);
$this
->drupalGet(sprintf('bibcite/reference/%s', $id));
$page = $this
->getSession()
->getPage();
$link = $page
->findLink('BibTeX');
$link
->click();
$content = $page
->getContent();
$this
->assertEquals(trim($expected_result), trim($content));
}