function MigrateFileConfigsTest::testFileSettings

Same name in this branch
  1. 9 core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php \Drupal\Tests\file\Kernel\Migrate\d6\MigrateFileConfigsTest::testFileSettings()
Same name in other branches
  1. 8.9.x core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php \Drupal\Tests\file\Kernel\Migrate\d6\MigrateFileConfigsTest::testFileSettings()
  2. 8.9.x core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php \Drupal\Tests\file\Kernel\Migrate\d7\MigrateFileConfigsTest::testFileSettings()
  3. 10 core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php \Drupal\Tests\file\Kernel\Migrate\d6\MigrateFileConfigsTest::testFileSettings()
  4. 10 core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php \Drupal\Tests\file\Kernel\Migrate\d7\MigrateFileConfigsTest::testFileSettings()
  5. 11.x core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileConfigsTest.php \Drupal\Tests\file\Kernel\Migrate\d6\MigrateFileConfigsTest::testFileSettings()
  6. 11.x core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php \Drupal\Tests\file\Kernel\Migrate\d7\MigrateFileConfigsTest::testFileSettings()

Tests migration of file variables to file.settings.yml.

File

core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileConfigsTest.php, line 28

Class

MigrateFileConfigsTest
Upgrade variables to file.settings.yml.

Namespace

Drupal\Tests\file\Kernel\Migrate\d7

Code

public function testFileSettings() {
    $config = $this->config('file.settings');
    $this->assertSame('textfield', $config->get('description.type'));
    $this->assertSame(256, $config->get('description.length'));
    $this->assertSame('sites/default/files/icons', $config->get('icon.directory'));
    $this->assertConfigSchema(\Drupal::service('config.typed'), 'file.settings', $config->get());
}

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