ViewsSettingsRenameTest.php in Drupal 9        
                          
                  
                        
  
  
  
  
  
File
  core/modules/views/tests/src/Functional/Update/ViewsSettingsRenameTest.php
  
    View source  
  <?php
namespace Drupal\Tests\views\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
class ViewsSettingsRenameTest extends UpdatePathTestBase {
  
  protected $defaultTheme = 'stark';
  
  protected function setDatabaseDumpFiles() {
    $this->databaseDumpFiles = [
      __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.8.0.bare.standard.php.gz',
    ];
  }
  
  public function testRenameViewsSettings() {
    $config = $this
      ->config('views.settings')
      ->get('ui.show');
    $this
      ->assertArrayHasKey('master_display', $config);
    $this
      ->assertArrayNotHasKey('default_display', $config);
    $this
      ->assertFalse($config['master_display']);
    
    $this
      ->runUpdates();
    $config = $this
      ->config('views.settings')
      ->get('ui.show');
    $this
      ->assertArrayHasKey('default_display', $config);
    $this
      ->assertArrayNotHasKey('master_display', $config);
    $this
      ->assertFalse($config['default_display']);
  }
}