public function LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 4.0.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
- 3.1.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
- 3.2.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
- 3.3.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
- 3.4.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
- 3.5.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
- 3.6.x tests/src/Functional/Update/LingotekProfileTargetSaveToVaultPostUpdateTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekProfileTargetSaveToVaultPostUpdateTest::testUpgrade()
- 3.7.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\UpdateCode
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);
}
}