You are here

public function BibciteTest::testStyleFileForm in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Functional/BibciteTest.php \Drupal\Tests\bibcite\Functional\BibciteTest::testStyleFileForm()

Test CslStyleFile form.

File

tests/src/Functional/BibciteTest.php, line 122

Class

BibciteTest
Test for main module functions.

Namespace

Drupal\Tests\bibcite\Functional

Code

public function testStyleFileForm() {
  $this
    ->drupalLogin($this->user);
  $this
    ->drupalGet('admin/config/bibcite/settings/csl_style/add-file');
  $page = $this
    ->getSession()
    ->getPage();
  $page
    ->fillField('edit-label', 'bmj');
  $page
    ->attachFileToField('edit-file', __DIR__ . '/../../styles/bmj.csl');
  $page
    ->pressButton('edit-submit');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}