You are here

public function BibciteEntityTest::testCslMappingForm in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_entity/tests/src/Functional/BibciteEntityTest.php \Drupal\Tests\bibcite_entity\Functional\BibciteEntityTest::testCslMappingForm()

Test CSL mapping form.

File

modules/bibcite_entity/tests/src/Functional/BibciteEntityTest.php, line 354

Class

BibciteEntityTest
Test for entity functions.

Namespace

Drupal\Tests\bibcite_entity\Functional

Code

public function testCslMappingForm() {
  $this
    ->drupalLogin($this->user);
  $this
    ->drupalGet('admin/config/bibcite/settings/mapping/csl');
  $page = $this
    ->getSession()
    ->getPage();
  $page
    ->selectFieldOption('edit-types-book-entity', 'book');
  $page
    ->selectFieldOption('edit-types-map-entity', 'map');
  $page
    ->selectFieldOption('edit-fields-edition-entity', 'bibcite_edition');
  $page
    ->selectFieldOption('edit-fields-note-entity', 'bibcite_notes');
  $page
    ->pressButton('edit-submit');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}