class TestViewsTest
Same name and namespace in other branches
- 11.x core/modules/views/tests/src/Kernel/TestViewsTest.php \Drupal\Tests\views\Kernel\TestViewsTest
- 10 core/modules/views/tests/src/Kernel/TestViewsTest.php \Drupal\Tests\views\Kernel\TestViewsTest
- 8.9.x core/modules/views/tests/src/Kernel/TestViewsTest.php \Drupal\Tests\views\Kernel\TestViewsTest
Tests that test views provided by all modules match schema.
@group config
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\views\Kernel\TestViewsTest uses \Drupal\Tests\SchemaCheckTestTrait extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of TestViewsTest
File
-
core/
modules/ views/ tests/ src/ Kernel/ TestViewsTest.php, line 16
Namespace
Drupal\Tests\views\KernelView source
class TestViewsTest extends KernelTestBase {
use SchemaCheckTestTrait;
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'views_test_data',
];
/**
* Tests default configuration data type.
*/
public function testDefaultConfig() {
// Create a typed config manager with access to configuration schema in
// every module, profile and theme.
$typed_config = new TypedConfigManager(\Drupal::service('config.storage'), new TestInstallStorage(InstallStorage::CONFIG_SCHEMA_DIRECTORY), \Drupal::service('cache.discovery'), \Drupal::service('module_handler'), \Drupal::service('class_resolver'));
// Create a configuration storage with access to default configuration in
// every module, profile and theme.
$default_config_storage = new TestInstallStorage('test_views');
foreach ($default_config_storage->listAll() as $config_name) {
// Skip files provided by the config_schema_test module since that module
// is explicitly for testing schema.
if (strpos($config_name, 'config_schema_test') === 0) {
continue;
}
$data = $default_config_storage->read($config_name);
$this->assertConfigSchema($typed_config, $config_name, $data);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.