You are here

public function LingotekPostUpdateRemoveAccountSandboxHostTest::testUpgrade in Lingotek Translation 3.8.x

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/Update/LingotekPostUpdateRemoveAccountSandboxHostTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekPostUpdateRemoveAccountSandboxHostTest::testUpgrade()
  2. 3.5.x tests/src/Functional/Update/LingotekPostUpdateRemoveAccountSandboxHostTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekPostUpdateRemoveAccountSandboxHostTest::testUpgrade()
  3. 3.6.x tests/src/Functional/Update/LingotekPostUpdateRemoveAccountSandboxHostTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekPostUpdateRemoveAccountSandboxHostTest::testUpgrade()
  4. 3.7.x tests/src/Functional/Update/LingotekPostUpdateRemoveAccountSandboxHostTest.php \Drupal\Tests\lingotek\Functional\Update\LingotekPostUpdateRemoveAccountSandboxHostTest::testUpgrade()

Tests the upgrade for clearing 'account.sandbox_host' and 'account.use_production' settings.

File

tests/src/Functional/Update/LingotekPostUpdateRemoveAccountSandboxHostTest.php, line 29

Class

LingotekPostUpdateRemoveAccountSandboxHostTest
Tests the upgrade for clearing 'account.sandbox_host' and 'account.use_production' settings.

Namespace

Drupal\Tests\lingotek\Functional\Update

Code

public function testUpgrade() {
  $lingotek_settings = $this
    ->config('lingotek.settings');
  $this
    ->assertFalse($lingotek_settings
    ->get('account.use_production'));
  $this
    ->assertSame('https://myaccount.lingotek.com', $lingotek_settings
    ->get('account.sandbox_host'));
  $this
    ->runUpdates();
  $lingotek_settings = \Drupal::configFactory()
    ->get('lingotek.settings');
  $this
    ->assertNull($lingotek_settings
    ->get('account.use_production'));
  $this
    ->assertNull($lingotek_settings
    ->get('account.sandbox_host'));
}