class ConfigTest
Same name in this branch
- 9 core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest
- 9 core/modules/migrate/tests/src/Unit/destination/ConfigTest.php \Drupal\Tests\migrate\Unit\destination\ConfigTest
- 9 core/modules/system/tests/src/Functional/File/ConfigTest.php \Drupal\Tests\system\Functional\File\ConfigTest
- 9 core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php \Drupal\Tests\Composer\Plugin\ProjectMessage\ConfigTest
- 9 core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php \Drupal\Tests\Composer\Plugin\VendorHardening\ConfigTest
- 9 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest
Same name and namespace in other branches
- 10 core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d8\ConfigTest
- 11.x core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d8\ConfigTest
- 11.x core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest
- 11.x core/modules/migrate/tests/src/Unit/destination/ConfigTest.php \Drupal\Tests\migrate\Unit\destination\ConfigTest
- 11.x core/modules/system/tests/src/Functional/File/ConfigTest.php \Drupal\Tests\system\Functional\File\ConfigTest
- 11.x core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php \Drupal\Tests\Composer\Plugin\ProjectMessage\ConfigTest
- 11.x core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php \Drupal\Tests\Composer\Plugin\VendorHardening\ConfigTest
- 11.x core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest
- 10 core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest
- 10 core/modules/migrate/tests/src/Unit/destination/ConfigTest.php \Drupal\Tests\migrate\Unit\destination\ConfigTest
- 10 core/modules/system/tests/src/Functional/File/ConfigTest.php \Drupal\Tests\system\Functional\File\ConfigTest
- 10 core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php \Drupal\Tests\Composer\Plugin\ProjectMessage\ConfigTest
- 10 core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php \Drupal\Tests\Composer\Plugin\VendorHardening\ConfigTest
- 10 core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest
- 8.9.x core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d8\ConfigTest
- 8.9.x core/modules/config/tests/config_test/src/Entity/ConfigTest.php \Drupal\config_test\Entity\ConfigTest
- 8.9.x core/modules/migrate/tests/src/Unit/destination/ConfigTest.php \Drupal\Tests\migrate\Unit\destination\ConfigTest
- 8.9.x core/modules/system/tests/src/Functional/File/ConfigTest.php \Drupal\Tests\system\Functional\File\ConfigTest
- 8.9.x core/tests/Drupal/Tests/Composer/Plugin/ProjectMessage/ConfigTest.php \Drupal\Tests\Composer\Plugin\ProjectMessage\ConfigTest
- 8.9.x core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/ConfigTest.php \Drupal\Tests\Composer\Plugin\VendorHardening\ConfigTest
- 8.9.x core/tests/Drupal/Tests/Core/Config/ConfigTest.php \Drupal\Tests\Core\Config\ConfigTest
Tests the config source plugin.
@covers \Drupal\migrate_drupal\Plugin\migrate\source\d8\Config
@group migrate_drupal
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase extends \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase extends \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d8\ConfigTest extends \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase extends \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of ConfigTest
File
-
core/
modules/ migrate_drupal/ tests/ src/ Kernel/ Plugin/ migrate/ source/ d8/ ConfigTest.php, line 13
Namespace
Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d8View source
class ConfigTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'migrate_drupal',
];
/**
* {@inheritdoc}
*/
public function providerSource() {
$data = [];
// The source database tables.
$data[0]['source_data'] = [
'config' => [
[
'collection' => 'language.af',
'name' => 'user.settings',
'data' => 'a:1:{s:9:"anonymous";s:14:"af - Anonymous";}',
],
[
'collection' => '',
'name' => 'user.settings',
'data' => 'a:1:{s:9:"anonymous";s:9:"Anonymous";}',
],
[
'collection' => 'language.de',
'name' => 'user.settings',
'data' => 'a:1:{s:9:"anonymous";s:14:"de - Anonymous";}',
],
[
'collection' => 'language.af',
'name' => 'bar',
'data' => 'b:0;',
],
],
];
// The expected results.
$data[0]['expected_results'] = [
[
'collection' => 'language.af',
'name' => 'user.settings',
'data' => [
'anonymous' => 'af - Anonymous',
],
],
[
'collection' => 'language.af',
'name' => 'bar',
'data' => FALSE,
],
];
$data[0]['expected_count'] = NULL;
$data[0]['configuration'] = [
'names' => [
'user.settings',
'bar',
],
'collections' => [
'language.af',
],
];
// Test with name and no collection in configuration.
$data[1]['source_data'] = $data[0]['source_data'];
$data[1]['expected_results'] = [
[
'collection' => 'language.af',
'name' => 'bar',
'data' => FALSE,
],
];
$data[1]['expected_count'] = NULL;
$data[1]['configuration'] = [
'names' => [
'bar',
],
];
// Test with collection and no name in configuration.
$data[2]['source_data'] = $data[0]['source_data'];
$data[2]['expected_results'] = [
[
'collection' => 'language.de',
'name' => 'user.settings',
'data' => [
'anonymous' => 'de - Anonymous',
],
],
];
$data[2]['expected_count'] = NULL;
$data[2]['configuration'] = [
'collections' => [
'language.de',
],
];
return $data;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.