You are here

public function LingotekUpgrade8221RemoveContentCloudSettingsTest::testUpgrade in Lingotek Translation 3.5.x

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

Tests that the upgrade removes Lingotek Content Cloud related preferences.

File

tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php, line 42

Class

LingotekUpgrade8221RemoveContentCloudSettingsTest
Tests the upgrade path for removing Lingotek Content Cloud related preferences.

Namespace

Drupal\Tests\lingotek\Functional\Update

Code

public function testUpgrade() {
  $this
    ->assertFalse($this->lingotekConfiguration
    ->getPreference('enable_content_cloud'));
  $this
    ->assertEqual($this->lingotekConfiguration
    ->getPreference('content_cloud_import_format'), 'article');
  $this
    ->assertEqual($this->lingotekConfiguration
    ->getPreference('content_cloud_import_status'), 0);
  $this
    ->runUpdates();
  $this
    ->assertNull($this->lingotekConfiguration
    ->getPreference('enable_content_cloud'));
  $this
    ->assertNull($this->lingotekConfiguration
    ->getPreference('content_cloud_import_format'));
  $this
    ->assertNull($this->lingotekConfiguration
    ->getPreference('content_cloud_import_status'));
}