ConfigStorageStagingTest.php

Namespace

Drupal\KernelTests\Core\Config

File

core/tests/Drupal/KernelTests/Core/Config/ConfigStorageStagingTest.php

View source
<?php

namespace Drupal\KernelTests\Core\Config;

use Drupal\Core\Config\FileStorage;
use Drupal\KernelTests\KernelTestBase;

/**
 * Tests that the service "config.storage.staging" has been deprecated.
 *
 * @group Test
 * @group legacy
 */
class ConfigStorageStagingTest extends KernelTestBase {
    
    /**
     * Tests deprecation of the "config.storage.staging" service.
     */
    public function testConfigStorageStagingDeprecation() {
        $this->expectDeprecation('The "config.storage.staging" service is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use the "config.storage.sync" service instead. See https://www.drupal.org/node/2574957');
        $storage_staging = \Drupal::service('config.storage.staging');
        // Ensure at least one assertion.
        $this->assertInstanceOf(FileStorage::class, $storage_staging);
    }

}

Classes

Title Deprecated Summary
ConfigStorageStagingTest Tests that the service "config.storage.staging" has been deprecated.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.