public function BibciteTest::testAddStyleForm in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/BibciteTest.php \Drupal\Tests\bibcite\Functional\BibciteTest::testAddStyleForm()
Test AddStyle form.
File
- tests/
src/ Functional/ BibciteTest.php, line 136
Class
- BibciteTest
- Test for main module functions.
Namespace
Drupal\Tests\bibcite\FunctionalCode
public function testAddStyleForm() {
$this
->drupalLogin($this->user);
$this
->drupalGet('admin/config/bibcite/settings/csl_style/add');
$page = $this
->getSession()
->getPage();
$page
->fillField('edit-label', 'bmj');
$csl_file = file_get_contents(__DIR__ . '/../../styles/bmj.csl');
$page
->fillField('edit-csl', $csl_file);
$page
->pressButton('edit-submit');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->pageTextContains('bmj');
}