ConfigUpdateTest.php

Namespace

Drupal\Tests\views\Functional\Update

File

core/modules/views/tests/src/Functional/Update/ConfigUpdateTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\views\Functional\Update;

use Drupal\FunctionalTests\Update\UpdatePathTestBase;
use PHPUnit\Framework\Attributes\CoversFunction;
use PHPUnit\Framework\Attributes\Group;

/**
 * Tests Views configuration updates.
 */
class ConfigUpdateTest extends UpdatePathTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected function setDatabaseDumpFiles() : void {
    $this->databaseDumpFiles = [
      __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz',
    ];
  }
  
  /**
   * Tests updating views.settings configuration.
   */
  public function testConfigUpdate() : void {
    $config = \Drupal::configFactory()->get('views.settings');
    $this->assertFalse($config->get('ui.show.advanced_column'));
    $this->runUpdates();
    $config = \Drupal::configFactory()->get('views.settings');
    $this->assertNull($config->get('ui.show.advanced_column'));
  }

}

Classes

Title Deprecated Summary
ConfigUpdateTest Tests Views configuration updates.

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