Issue #3444566 by mondrake: Fix remaining deprecated string array keys in data sets returned by data provider methods that do not match the parameter names

(cherry picked from commit f9d3ce1046)
merge-requests/7375/merge
catch 2024-05-01 18:21:37 +01:00
parent 2fa287c35f
commit 68cf009115
10 changed files with 79 additions and 79 deletions

View File

@ -1544,39 +1544,39 @@ PHP,
return [
'tag that belongs to a superset' => [
'tag' => 'h2',
'expected_plugin' => 'ckeditor5_heading',
'expected_plugin_id' => 'ckeditor5_heading',
],
'tag only available as tag' => [
'tag' => 'nav',
'expected_plugin' => 'ckeditor5_definition_supporting_element_just_nav',
'expected_plugin_id' => 'ckeditor5_definition_supporting_element_just_nav',
],
'between just tag, full use of class, and constrained use of class, return full use of class' => [
'tag' => 'article',
'expected_plugin' => 'ckeditor5_definition_supporting_element_article_class',
'expected_plugin_id' => 'ckeditor5_definition_supporting_element_article_class',
],
'between just tag and full use of class, return full use of class' => [
'tag' => 'footer',
'expected_plugin' => 'ckeditor5_definition_supporting_element_footer_class',
'expected_plugin_id' => 'ckeditor5_definition_supporting_element_footer_class',
],
'between just tag and constrained use of class, return constrained use of class' => [
'tag' => 'aside',
'expected_plugin' => 'ckeditor5_definition_supporting_element_aside_class_with_values',
'expected_plugin_id' => 'ckeditor5_definition_supporting_element_aside_class_with_values',
],
'between full use of class and constrained use of class, return full use of class' => [
'tag' => 'main',
'expected_plugin' => 'ckeditor5_definition_supporting_element_main_class',
'expected_plugin_id' => 'ckeditor5_definition_supporting_element_main_class',
],
'between one plugin allows one attribute, second allows two, return the one that allows two' => [
'tag' => 'figure',
'expected_plugin' => 'ckeditor5_definition_supporting_element_figure_two_attrib',
'expected_plugin_id' => 'ckeditor5_definition_supporting_element_figure_two_attrib',
],
'between one plugin allows one attribute, second allows two (but appearing in opposite order), still return the one that allows two' => [
'tag' => 'dialog',
'expected_plugin' => 'ckeditor5_definition_supporting_element_dialog_two_attrib',
'expected_plugin_id' => 'ckeditor5_definition_supporting_element_dialog_two_attrib',
],
'tag that belongs to a plugin with conditions' => [
'tag' => 'drupal-media',
'expected_plugin' => NULL,
'expected_plugin_id' => NULL,
],
];
}

View File

@ -124,24 +124,24 @@ class MigrateCommentTypeTest extends MigrateDrupal7TestBase {
public static function providerTestNoCommentTypeMigration() {
return [
'Node module is disabled in source' => [
'Disabled source modules' => ['node'],
'Expected messages' => [
'disabled_source_modules' => ['node'],
'expected_messages' => [
'error' => [
'Migration d7_comment_type did not meet the requirements. The node module is not enabled in the source site.',
],
],
],
'Comment module is disabled in source' => [
'Disabled source modules' => ['comment'],
'Expected messages' => [
'disabled_source_modules' => ['comment'],
'expected_messages' => [
'error' => [
'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site.',
],
],
],
'Node and comment modules are disabled in source' => [
'Disabled source modules' => ['comment', 'node'],
'Expected messages' => [
'disabled_source_modules' => ['comment', 'node'],
'expected_messages' => [
'error' => [
'Migration d7_comment_type did not meet the requirements. The module comment is not enabled in the source site.',
],

View File

@ -67,7 +67,7 @@ class FieldInstanceLabelDescriptionTranslationTest extends MigrateSqlSourceTestB
],
];
$test[0]['expected_results'] = [
$test[0]['expected_data'] = [
[
'property' => 'widget_label',
'translation' => "fr - Integer Field",

View File

@ -144,22 +144,22 @@ class ManageFieldsMultipleTypesTest extends ManageFieldsFunctionalTestBase {
return [
'node' => [
'entity_type' => 'node',
'article' => [
'bundle1' => [
'id' => 'article',
'path' => 'admin/structure/types/manage/article',
],
'page' => [
'bundle2' => [
'id' => 'page',
'path' => 'admin/structure/types/manage/page',
],
],
'taxonomy' => [
'entity_type' => 'taxonomy_term',
'tags' => [
'bundle1' => [
'id' => 'tags',
'path' => 'admin/structure/taxonomy/manage/tags/overview',
],
'kittens' => [
'bundle2' => [
'id' => 'kittens',
'path' => 'admin/structure/taxonomy/manage/kittens/overview',
],

View File

@ -57,100 +57,100 @@ class MediaEmbedFilterTestBase extends MediaJavascriptTestBase {
public static function providerTestValidations(): array {
return [
'Tests that no filter_html occurs when filter_html not enabled.' => [
'filters[filter_html][status]' => FALSE,
'filters[filter_align][status]' => FALSE,
'filters[filter_caption][status]' => FALSE,
'filters[filter_html_image_secure][status]' => FALSE,
'filter_html_status' => FALSE,
'filter_align_status' => FALSE,
'filter_caption_status' => FALSE,
'filter_html_image_secure_status' => FALSE,
'media_embed' => TRUE,
'allowed_html' => FALSE,
'expected_error_message' => FALSE,
],
'Tests validation when both filter_html and media_embed are disabled.' => [
'filters[filter_html][status]' => FALSE,
'filters[filter_align][status]' => FALSE,
'filters[filter_caption][status]' => FALSE,
'filters[filter_html_image_secure][status]' => FALSE,
'filter_html_status' => FALSE,
'filter_align_status' => FALSE,
'filter_caption_status' => FALSE,
'filter_html_image_secure_status' => FALSE,
'media_embed' => FALSE,
'allowed_html' => FALSE,
'expected_error_message' => FALSE,
],
'Tests validation when media_embed filter not enabled and filter_html is enabled.' => [
'filters[filter_html][status]' => TRUE,
'filters[filter_align][status]' => FALSE,
'filters[filter_caption][status]' => FALSE,
'filters[filter_html_image_secure][status]' => FALSE,
'filter_html_status' => TRUE,
'filter_align_status' => FALSE,
'filter_caption_status' => FALSE,
'filter_html_image_secure_status' => FALSE,
'media_embed' => FALSE,
'allowed_html' => 'default',
'expected_error_message' => FALSE,
],
'Tests validation when drupal-media element has no attributes.' => [
'filters[filter_html][status]' => TRUE,
'filters[filter_align][status]' => FALSE,
'filters[filter_caption][status]' => FALSE,
'filters[filter_html_image_secure][status]' => FALSE,
'filter_html_status' => TRUE,
'filter_align_status' => FALSE,
'filter_caption_status' => FALSE,
'filter_html_image_secure_status' => FALSE,
'media_embed' => TRUE,
'allowed_html' => "<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <drupal-media>",
'expected_error_message' => 'The <drupal-media> tag in the allowed HTML tags is missing the following attributes: data-entity-type, data-entity-uuid.',
],
'Tests validation when drupal-media element lacks some required attributes.' => [
'filters[filter_html][status]' => TRUE,
'filters[filter_align][status]' => FALSE,
'filters[filter_caption][status]' => FALSE,
'filters[filter_html_image_secure][status]' => FALSE,
'filter_html_status' => TRUE,
'filter_align_status' => FALSE,
'filter_caption_status' => FALSE,
'filter_html_image_secure_status' => FALSE,
'media_embed' => TRUE,
'allowed_html' => "<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <drupal-media data-entity-uuid data-align>",
'expected_error_message' => 'The <drupal-media> tag in the allowed HTML tags is missing the following attributes: data-entity-type.',
],
'Tests validation when both filter_html and media_embed are enabled and configured correctly' => [
'filters[filter_html][status]' => TRUE,
'filters[filter_align][status]' => FALSE,
'filters[filter_caption][status]' => FALSE,
'filters[filter_html_image_secure][status]' => FALSE,
'filter_html_status' => TRUE,
'filter_align_status' => FALSE,
'filter_caption_status' => FALSE,
'filter_html_image_secure_status' => FALSE,
'media_embed' => TRUE,
'allowed_html' => "<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <drupal-media data-entity-type data-entity-uuid data-view-mode>",
'expected_error_message' => FALSE,
],
'Order validation: media_embed before all filters' => [
'filters[filter_html][status]' => TRUE,
'filters[filter_align][status]' => TRUE,
'filters[filter_caption][status]' => TRUE,
'filters[filter_html_image_secure][status]' => TRUE,
'filter_html_status' => TRUE,
'filter_align_status' => TRUE,
'filter_caption_status' => TRUE,
'filter_html_image_secure_status' => TRUE,
'media_embed' => '-5',
'allowed_html' => "<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <drupal-media data-entity-type data-entity-uuid data-view-mode>",
'expected_error_message' => 'The Embed media filter needs to be placed after the following filters: Align images, Caption images, Restrict images to this site.',
],
'Order validation: media_embed before filter_align' => [
'filters[filter_html][status]' => FALSE,
'filters[filter_align][status]' => TRUE,
'filters[filter_caption][status]' => FALSE,
'filters[filter_html_image_secure][status]' => FALSE,
'filter_html_status' => FALSE,
'filter_align_status' => TRUE,
'filter_caption_status' => FALSE,
'filter_html_image_secure_status' => FALSE,
'media_embed' => '-5',
'allowed_html' => '',
'expected_error_message' => 'The Embed media filter needs to be placed after the Align images filter.',
],
'Order validation: media_embed before filter_caption' => [
'filters[filter_html][status]' => FALSE,
'filters[filter_align][status]' => FALSE,
'filters[filter_caption][status]' => TRUE,
'filters[filter_html_image_secure][status]' => FALSE,
'filter_html_status' => FALSE,
'filter_align_status' => FALSE,
'filter_caption_status' => TRUE,
'filter_html_image_secure_status' => FALSE,
'media_embed' => '-5',
'allowed_html' => '',
'expected_error_message' => 'The Embed media filter needs to be placed after the Caption images filter.',
],
'Order validation: media_embed before filter_html_image_secure' => [
'filters[filter_html][status]' => FALSE,
'filters[filter_align][status]' => FALSE,
'filters[filter_caption][status]' => FALSE,
'filters[filter_html_image_secure][status]' => TRUE,
'filter_html_status' => FALSE,
'filter_align_status' => FALSE,
'filter_caption_status' => FALSE,
'filter_html_image_secure_status' => TRUE,
'media_embed' => '-5',
'allowed_html' => '',
'expected_error_message' => 'The Embed media filter needs to be placed after the Restrict images to this site filter.',
],
'Order validation: media_embed after filter_align and filter_caption but before filter_html_image_secure' => [
'filters[filter_html][status]' => TRUE,
'filters[filter_align][status]' => TRUE,
'filters[filter_caption][status]' => TRUE,
'filters[filter_html_image_secure][status]' => TRUE,
'filter_html_status' => TRUE,
'filter_align_status' => TRUE,
'filter_caption_status' => TRUE,
'filter_html_image_secure_status' => TRUE,
'media_embed' => '5',
'allowed_html' => "<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <drupal-media data-entity-type data-entity-uuid data-view-mode>",
'expected_error_message' => 'The Embed media filter needs to be placed after the Restrict images to this site filter.',

View File

@ -82,7 +82,7 @@ class MenuTranslationTest extends MigrateSqlSourceTestBase {
'i18n_status' => 0,
],
];
$tests[0]['expected_results'] = [
$tests[0]['expected_data'] = [
[
'menu_name' => 'navigation',
'type' => 'menu',

View File

@ -647,7 +647,7 @@ class UpdateContribTest extends UpdateTestBase {
// Security releases available for module major release 1.
// No releases for next major.
'8.x-1.0, 8.x-1.2' => [
'module_patch_version' => '8.x-1.0',
'module_version' => '8.x-1.0',
'expected_security_releases' => ['8.x-1.2'],
'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,
'fixture' => 'sec.8.x-1.2',
@ -656,7 +656,7 @@ class UpdateContribTest extends UpdateTestBase {
// 8.x-1.1 security release marked as insecure.
// No releases for next major.
'8.x-1.0, 8.x-1.1 8.x-1.2' => [
'module_patch_version' => '8.x-1.0',
'module_version' => '8.x-1.0',
'expected_security_releases' => ['8.x-1.2'],
'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,
'fixture' => 'sec.8.x-1.1_8.x-1.2',
@ -664,13 +664,13 @@ class UpdateContribTest extends UpdateTestBase {
// Security release available for module major release 2.
// No releases for next major.
'8.x-2.0, 8.x-2.2' => [
'module_patch_version' => '8.x-2.0',
'module_version' => '8.x-2.0',
'expected_security_releases' => ['8.x-2.2'],
'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,
'fixture' => 'sec.8.x-2.2_1.x_secure',
],
'8.x-2.2, 8.x-1.2 8.x-2.2' => [
'module_patch_version' => '8.x-2.2',
'module_version' => '8.x-2.2',
'expected_security_releases' => [],
'expected_update_message_type' => static::UPDATE_NONE,
'fixture' => 'sec.8.x-1.2_8.x-2.2',
@ -678,7 +678,7 @@ class UpdateContribTest extends UpdateTestBase {
// Security release available for module major release 1.
// Security release also available for next major.
'8.x-1.0, 8.x-1.2 8.x-2.2' => [
'module_patch_version' => '8.x-1.0',
'module_version' => '8.x-1.0',
'expected_security_releases' => ['8.x-1.2'],
'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,
'fixture' => 'sec.8.x-1.2_8.x-2.2',
@ -687,7 +687,7 @@ class UpdateContribTest extends UpdateTestBase {
// releases are not marked as insecure.
// Security release available for next major.
'8.x-1.0, 8.x-2.2, not insecure' => [
'module_patch_version' => '8.x-1.0',
'module_version' => '8.x-1.0',
'expected_security_releases' => [],
'expected_update_message_type' => static::UPDATE_AVAILABLE,
'fixture' => 'sec.8.x-2.2_1.x_secure',
@ -695,13 +695,13 @@ class UpdateContribTest extends UpdateTestBase {
// On latest security release for module major release 1.
// Security release also available for next major.
'8.x-1.2, 8.x-1.2 8.x-2.2' => [
'module_patch_version' => '8.x-1.2',
'expected_security_release' => [],
'module_version' => '8.x-1.2',
'expected_security_releases' => [],
'expected_update_message_type' => static::UPDATE_NONE,
'fixture' => 'sec.8.x-1.2_8.x-2.2',
],
'8.x-2.0, 8.x-1.2 8.x-2.2' => [
'module_patch_version' => '8.x-2.0',
'module_version' => '8.x-2.0',
'expected_security_releases' => ['8.x-2.2'],
'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,
'fixture' => 'sec.8.x-1.2_8.x-2.2',

View File

@ -104,7 +104,7 @@ trait UpdateSemverTestSecurityAvailabilityTrait {
// is marked as insecure.
'0.2, 0.2' => [
'site_patch_version' => '0.2',
'expected_security_release' => ['1.2', '2.0-rc2'],
'expected_security_releases' => ['1.2', '2.0-rc2'],
'expected_update_message_type' => static::UPDATE_AVAILABLE,
'fixture' => 'sec.8.2.0-rc2',
],
@ -162,13 +162,13 @@ trait UpdateSemverTestSecurityAvailabilityTrait {
// Security release available for next minor.
'0.0, 1.2, secure' => [
'site_patch_version' => '0.0',
'expected_security_release' => ['1.2'],
'expected_security_releases' => ['1.2'],
'expected_update_message_type' => static::UPDATE_AVAILABLE,
'fixture' => 'sec.8.1.2',
],
'0.2, 1.2, secure' => [
'site_patch_version' => '0.2',
'expected_security_release' => ['1.2'],
'expected_security_releases' => ['1.2'],
'expected_update_message_type' => static::UPDATE_AVAILABLE,
'fixture' => 'sec.8.1.2',
],

View File

@ -73,7 +73,7 @@ class SuperUserAccessInstallTest extends InstallerTestBase {
*
* @dataProvider getInstallTests
*/
public function testInstalled(bool $expected_runtime_has_permission, bool $expected_no_access_message, array $expected_roles): void {
public function testInstalled(bool $expected_runtime_has_permission, bool $expected_no_access_message, array $expected_roles, string $install_code, bool $super_user_policy): void {
$user = User::load(1);
$this->assertSame($expected_runtime_has_permission, $user->hasPermission('administer software updates'));
$this->assertTrue(\Drupal::state()->get('admin_permission_in_installer'));

View File

@ -218,7 +218,7 @@ class JqueryUiLibraryAssetsTest extends BrowserTestBase {
*
* @dataProvider providerTestAssetLoading
*/
public function testLibraryAssetLoadingOrder($library) {
public function testLibraryAssetLoadingOrder($library, array $expected_css, array $expected_js) {
$this->drupalGet("jqueryui_library_assets_test/$library");
$this->assertSession()->statusCodeEquals(200);