You are here

public function BibciteEntityTest::testSettingsLinksForm 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::testSettingsLinksForm()

Test Settings Links form.

File

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

Class

BibciteEntityTest
Test for entity functions.

Namespace

Drupal\Tests\bibcite_entity\Functional

Code

public function testSettingsLinksForm() {
  $this
    ->drupalLogin($this->user);
  $this
    ->drupalGet('admin/structure/bibcite/reference/settings/links');
  $page = $this
    ->getSession()
    ->getPage();
  $page
    ->uncheckField('edit-links-google-scholar-enabled');
  $page
    ->uncheckField('edit-links-doi-enabled');
  $page
    ->uncheckField('edit-links-pubmed-enabled');
  $page
    ->checkField('edit-links-google-scholar-enabled');
  $page
    ->checkField('edit-links-doi-enabled');
  $page
    ->checkField('edit-links-pubmed-enabled');
  $page
    ->pressButton('edit-submit');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}