function StagedDBUpdateValidatorTest::providerStagedDatabaseUpdate
Data provider for ::testStagedDatabaseUpdates().
Return value
array[] The test cases.
File
-
core/
modules/ package_manager/ tests/ src/ Kernel/ StagedDBUpdateValidatorTest.php, line 64
Class
- StagedDBUpdateValidatorTest
- @covers \Drupal\package_manager\Validator\SandboxDatabaseUpdatesValidator @group package_manager @internal
Namespace
Drupal\Tests\package_manager\KernelCode
public static function providerStagedDatabaseUpdate() : array {
$summary = t('Database updates have been detected in the following extensions.');
return [
'schema update in installed module' => [
'core/modules/system',
'install',
[
ValidationResult::createWarning([
t('System'),
], $summary),
],
],
'post-update in installed module' => [
'core/modules/system',
'post_update.php',
[
ValidationResult::createWarning([
t('System'),
], $summary),
],
],
'schema update in installed theme' => [
'core/themes/stark',
'install',
[
ValidationResult::createWarning([
t('Stark'),
], $summary),
],
],
'post-update in installed theme' => [
'core/themes/stark',
'post_update.php',
[
ValidationResult::createWarning([
t('Stark'),
], $summary),
],
],
// The validator should ignore changes in any extensions that aren't
// installed.
'schema update in non-installed module' => [
'core/modules/views',
'install',
[],
],
'post-update in non-installed module' => [
'core/modules/views',
'post_update.php',
[],
],
'schema update in non-installed theme' => [
'core/themes/olivero',
'install',
[],
],
'post-update in non-installed theme' => [
'core/themes/olivero',
'post_update.php',
[],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.