You are here

public function LingotekProfileFormTest::testFilters in Lingotek Translation 3.3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()
  2. 4.0.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()
  3. 3.0.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()
  4. 3.1.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()
  5. 3.2.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()
  6. 3.4.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()
  7. 3.5.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()
  8. 3.6.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()
  9. 3.7.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()
  10. 3.8.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::testFilters()

Tests that filter is shown in the profile form when there are filters.

File

tests/src/Functional/Form/LingotekProfileFormTest.php, line 625

Class

LingotekProfileFormTest
Tests the Lingotek profile form.

Namespace

Drupal\Tests\lingotek\Functional\Form

Code

public function testFilters() {
  $assert_session = $this
    ->assertSession();
  $this
    ->drupalGet('admin/lingotek/settings');
  $this
    ->clickLink(t('Add new Translation Profile'));
  $this
    ->assertFieldByName('filter');
  $this
    ->assertFieldByName('subfilter');
  $assert_session
    ->optionExists('edit-filter', 'default');
  $assert_session
    ->optionExists('edit-filter', 'project_default');
  $assert_session
    ->optionExists('edit-filter', 'drupal_default');
  $assert_session
    ->optionExists('edit-filter', 'test_filter');
  $assert_session
    ->optionExists('edit-filter', 'test_filter2');
  $assert_session
    ->optionExists('edit-filter', 'test_filter3');
  $assert_session
    ->optionExists('edit-subfilter', 'default');
  $assert_session
    ->optionExists('edit-subfilter', 'project_default');
  $assert_session
    ->optionExists('edit-subfilter', 'drupal_default');
  $assert_session
    ->optionExists('edit-subfilter', 'test_filter');
  $assert_session
    ->optionExists('edit-subfilter', 'test_filter2');
  $assert_session
    ->optionExists('edit-subfilter', 'test_filter3');
}