You are here

public function LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade in Lingotek Translation 3.3.x

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
  2. 3.1.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
  3. 3.2.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
  4. 3.4.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
  5. 3.5.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
  6. 3.6.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
  7. 3.7.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
  8. 3.8.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()

Tests that the upgrade sets the correct value for custom profile settings

File

tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php, line 28

Class

LingotekProfileTargetSaveToVaultPostUpdateTest
Tests the upgrade path for setting custom target save-to vault setting.

Namespace

Drupal\Tests\lingotek\Functional\Update

Code

public function testUpgrade() {
  $this
    ->runUpdates();
  $profile = LingotekProfile::load('custom_profile');
  $languages = \Drupal::languageManager()
    ->getLanguages();
  foreach ($languages as $language) {
    $lancode = $language
      ->getId();
    $vault = $profile
      ->getVaultForTarget($lancode);
    $vault_is_set = $vault !== NULL ? TRUE : FALSE;
    $this
      ->assertTrue($vault_is_set);
    $this
      ->assertEquals('default', $vault);
  }
}