LingotekUpgrade8221RemoveContentCloudSettingsTest.php in Lingotek Translation 3.2.x
Same filename and directory in other branches
- 8.2 tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
- 4.0.x tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
- 3.0.x tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
- 3.1.x tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
- 3.3.x tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
- 3.4.x tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
- 3.5.x tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
- 3.6.x tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
- 3.7.x tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
- 3.8.x tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.php
Namespace
Drupal\Tests\lingotek\Functional\UpdateFile
tests/src/Functional/Update/LingotekUpgrade8221RemoveContentCloudSettingsTest.phpView source
<?php
namespace Drupal\Tests\lingotek\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
/**
* Tests the upgrade path for removing Lingotek Content Cloud related preferences.
*
* @group lingotek
* @group legacy
*/
class LingotekUpgrade8221RemoveContentCloudSettingsTest extends UpdatePathTestBase {
/**
* The Lingotek configuration service.
*
* @var \Drupal\lingotek\LingotekConfigurationServiceInterface
*/
protected $lingotekConfiguration;
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->lingotekConfiguration = $this->container
->get('lingotek.configuration');
}
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../fixtures/update/drupal-88x.lingotek-2x20.standard.php.gz',
];
}
/**
* Tests that the upgrade removes Lingotek Content Cloud related preferences.
*/
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'));
}
}
Classes
Name | Description |
---|---|
LingotekUpgrade8221RemoveContentCloudSettingsTest | Tests the upgrade path for removing Lingotek Content Cloud related preferences. |