diff -u b/core/modules/media/tests/src/Kernel/MediaSourceTest.php b/core/modules/media/tests/src/Kernel/MediaSourceTest.php --- b/core/modules/media/tests/src/Kernel/MediaSourceTest.php +++ b/core/modules/media/tests/src/Kernel/MediaSourceTest.php @@ -434,26 +434,26 @@ /** @var \Drupal\media\MediaSourceInterface $source */ $source = $manager->createInstance('test', []); $source->submitConfigurationForm($form, $form_state); - $expected = ['test_config_value' => 'Somewhere over the rainbow.', 'source_field' => 'field_media_test_1']; - $this->assertEquals($expected, $source->getConfiguration(), 'Submitted values were saved correctly.'); + $expected = ['source_field' => 'field_media_test_1', 'test_config_value' => 'Somewhere over the rainbow.']; + $this->assertSame($expected, $source->getConfiguration(), 'Submitted values were saved correctly.'); // Try to save a NULL value. $form_state->setValue('test_config_value', NULL); $source->submitConfigurationForm($form, $form_state); $expected['test_config_value'] = NULL; - $this->assertEquals($expected, $source->getConfiguration(), 'Submitted values were saved correctly.'); + $this->assertSame($expected, $source->getConfiguration(), 'Submitted values were saved correctly.'); // Make sure that the config keys are determined correctly even if the // existing value is NULL. $form_state->setValue('test_config_value', 'Somewhere over the rainbow.'); $source->submitConfigurationForm($form, $form_state); $expected['test_config_value'] = 'Somewhere over the rainbow.'; - $this->assertEquals($expected, $source->getConfiguration(), 'Submitted values were saved correctly.'); + $this->assertSame($expected, $source->getConfiguration(), 'Submitted values were saved correctly.'); // Make sure that a non-relevant value will be skipped. $form_state->setValue('not_relevant', 'Should not be saved in the plugin.'); $source->submitConfigurationForm($form, $form_state); - $this->assertEquals($expected, $source->getConfiguration(), 'Submitted values were saved correctly.'); + $this->assertSame($expected, $source->getConfiguration(), 'Submitted values were saved correctly.'); } /**