You are here

public function ImportTest::testImportForm in Bibliography & Citation 2.0.x

Same name and namespace in other branches
  1. 8 modules/bibcite_import/tests/src/Functional/ImportTest.php \Drupal\Tests\bibcite_import\Functional\ImportTest::testImportForm()

Test Import form.

File

modules/bibcite_import/tests/src/Functional/ImportTest.php, line 52

Class

ImportTest
Test for main import functions.

Namespace

Drupal\Tests\bibcite_import\Functional

Code

public function testImportForm() {
  $this
    ->drupalLogin($this->user);
  $this
    ->drupalGet('admin/content/bibcite/reference/import');
  $page = $this
    ->getSession()
    ->getPage();
  $page
    ->attachFileToField('edit-file', __DIR__ . '/data/zero_test.ris');
  $page
    ->selectFieldOption('edit-format', 'RIS');
  $page
    ->pressButton('edit-submit');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}