public function LingotekProfileAutoRequestTranslationsPostUpdateTest::testUpgrade in Lingotek Translation 8.2
Tests that the upgrade sets the correct value for the profile settings.
File
- tests/
src/ Functional/ Update/ LingotekProfileAutoRequestTranslationsPostUpdateTest.php, line 29
Class
- LingotekProfileAutoRequestTranslationsPostUpdateTest
- Tests the upgrade path for setting auto_request profile setting.
Namespace
Drupal\Tests\lingotek\Functional\UpdateCode
public function testUpgrade() {
$this
->runUpdates();
$profile = LingotekProfile::load('auto_download');
$this
->assertFalse($profile
->hasAutomaticRequest());
$this
->assertFalse($profile
->hasAutomaticRequestForTarget('ca'));
$this
->assertFalse($profile
->hasAutomaticRequestForTarget('it'));
$profile = LingotekProfile::load('auto_upload');
$this
->assertTrue($profile
->hasAutomaticRequest());
$this
->assertTrue($profile
->hasAutomaticRequestForTarget('ca'));
$this
->assertTrue($profile
->hasAutomaticRequestForTarget('it'));
}