You are here

public function LingotekChangeAccountDefaultsTest::testChangeCommunity in Lingotek Translation 3.7.x

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

File

tests/src/Functional/LingotekChangeAccountDefaultsTest.php, line 12

Class

LingotekChangeAccountDefaultsTest
Tests changing account defaults.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testChangeCommunity() {
  $this
    ->drupalGet('admin/lingotek/settings');
  $this
    ->assertTableValue('community', 'Test community (test_community)');
  $this
    ->assertTableValue('workflow', 'Test workflow (test_workflow)');
  $this
    ->assertTableValue('project', 'Test project (test_project)');
  $this
    ->assertTableValue('vault', 'Test vault (test_vault)');

  // Click on the Community link.
  $this
    ->clickLink(t('Edit defaults'), 0);
  $this
    ->drupalPostForm(NULL, [
    'community' => 'test_community2',
  ], t('Save configuration'));
  $this
    ->assertTableValue('community', 'Test community 2 (test_community2)');
  $this
    ->assertTableValue('workflow', 'Test workflow (test_workflow)');
  $this
    ->assertTableValue('project', 'Test project (test_project)');
  $this
    ->assertTableValue('vault', 'Test vault (test_vault)');

  // Click on the Project link.
  $this
    ->clickLink(t('Edit defaults'), 1);
  $this
    ->drupalPostForm(NULL, [
    'project' => 'test_project2',
    'vault' => 'test_vault2',
  ], t('Save configuration'));
  $this
    ->assertTableValue('community', 'Test community 2 (test_community2)');
  $this
    ->assertTableValue('workflow', 'Test workflow (test_workflow)');
  $this
    ->assertTableValue('project', 'Test project 2 (test_project2)');
  $this
    ->assertTableValue('vault', 'Test vault 2 (test_vault2)');
}