diff --git a/core/modules/action/src/Tests/BulkFormTest.php b/core/modules/action/src/Tests/BulkFormTest.php index 8fd634b..86c34d0 100644 --- a/core/modules/action/src/Tests/BulkFormTest.php +++ b/core/modules/action/src/Tests/BulkFormTest.php @@ -19,6 +19,11 @@ class BulkFormTest extends WebTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to install. * * @var array diff --git a/core/modules/action/tests/action_bulk_test/action_bulk_test.info.yml b/core/modules/action/tests/action_bulk_test/action_bulk_test.info.yml index 296a33a..37b4285 100644 --- a/core/modules/action/tests/action_bulk_test/action_bulk_test.info.yml +++ b/core/modules/action/tests/action_bulk_test/action_bulk_test.info.yml @@ -7,3 +7,4 @@ core: 8.x dependencies: - action - views + - node diff --git a/core/modules/block/src/Tests/BlockUiTest.php b/core/modules/block/src/Tests/BlockUiTest.php index e03135f..0313443 100644 --- a/core/modules/block/src/Tests/BlockUiTest.php +++ b/core/modules/block/src/Tests/BlockUiTest.php @@ -17,6 +17,11 @@ class BlockUiTest extends WebTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to install. * * @var array diff --git a/core/modules/block/tests/modules/block_test/config/schema/block_test.schema.yml b/core/modules/block/tests/modules/block_test/config/schema/block_test.schema.yml new file mode 100644 index 0000000..e0b13cb --- /dev/null +++ b/core/modules/block/tests/modules/block_test/config/schema/block_test.schema.yml @@ -0,0 +1,7 @@ +block.settings.test_block_instantiation: + type: block_settings + label: 'Test block instantiation settings' + mapping: + display_message: + type: string + label: 'Message text' diff --git a/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php b/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php index d4c1372..d7c6d9f 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php @@ -19,6 +19,11 @@ class CKEditorAdminTest extends WebTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array @@ -154,8 +159,7 @@ function testExistingFormat() { $this->drupalGet('admin/config/content/formats/manage/filtered_html'); $expected_settings['toolbar']['rows'][0][] = array( 'name' => 'Action history', - 'items' => array('Undo', '|', 'Redo'), - array('JustifyCenter') + 'items' => array('Undo', '|', 'Redo', 'JustifyCenter'), ); $edit = array( 'editor[settings][toolbar][button_groups]' => json_encode($expected_settings['toolbar']['rows']), diff --git a/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php b/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php index 37e047c..23cd3c2 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php @@ -17,6 +17,11 @@ class CKEditorLoadingTest extends WebTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/color/color.module b/core/modules/color/color.module index e9cc0a6..390af48 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -60,7 +60,8 @@ function color_form_system_theme_settings_alter(&$form, FormStateInterface $form ); $form['color'] += color_scheme_form($form, $form_state, $theme); $form['#validate'][] = 'color_scheme_form_validate'; - $form['#submit'][] = 'color_scheme_form_submit'; + // Ensure color submission happens first so we can unset extra values. + array_unshift($form['#submit'], 'color_scheme_form_submit'); } } @@ -337,21 +338,26 @@ function color_scheme_form_validate($form, FormStateInterface $form_state) { */ function color_scheme_form_submit($form, FormStateInterface $form_state) { - // Get theme coloring info. - if (!$form_state->hasValue('info')) { + // Avoid color settings spilling over to theme settings. + $color_settings = array('theme', 'palette', 'scheme'); + if ($form_state->hasValue('info')) { + $color_settings[] = 'info'; + } + foreach ($color_settings as $setting_name) { + ${$setting_name} = $form_state->getValue($setting_name); + $form_state->unsetValue($setting_name); + } + if (!isset($info)) { return; } - $theme = $form_state->getValue('theme'); - $info = $form_state->getValue('info'); $config = \Drupal::config('color.theme.' . $theme); // Resolve palette. - $palette = $form_state->getValue('palette'); - if ($form_state->getValue('scheme') != '') { + if ($scheme != '') { foreach ($palette as $key => $color) { - if (isset($info['schemes'][$form_state->getValue('scheme')]['colors'][$key])) { - $palette[$key] = $info['schemes'][$form_state->getValue('scheme')]['colors'][$key]; + if (isset($info['schemes'][$scheme]['colors'][$key])) { + $palette[$key] = $info['schemes'][$scheme]['colors'][$key]; } } $palette += $info['schemes']['default']['colors']; diff --git a/core/modules/color/src/Tests/ColorConfigSchemaTest.php b/core/modules/color/src/Tests/ColorConfigSchemaTest.php index bb1e03c..01f3646 100644 --- a/core/modules/color/src/Tests/ColorConfigSchemaTest.php +++ b/core/modules/color/src/Tests/ColorConfigSchemaTest.php @@ -7,7 +7,6 @@ namespace Drupal\color\Tests; -use Drupal\config\Tests\SchemaCheckTestTrait; use Drupal\simpletest\WebTestBase; /** @@ -17,7 +16,10 @@ */ class ColorConfigSchemaTest extends WebTestBase { - use SchemaCheckTestTrait; + /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; /** * Modules to install. @@ -53,7 +55,6 @@ function testValidColorConfigSchema() { $edit['scheme'] = ''; $edit['palette[bg]'] = '#123456'; $this->drupalPostForm($settings_path, $edit, t('Save configuration')); - $this->assertConfigSchema(\Drupal::service('config.typed'), 'color.theme.bartik', \Drupal::config('color.theme.bartik')->get()); } } diff --git a/core/modules/color/src/Tests/ColorTest.php b/core/modules/color/src/Tests/ColorTest.php index 185faae..8adc7f2 100644 --- a/core/modules/color/src/Tests/ColorTest.php +++ b/core/modules/color/src/Tests/ColorTest.php @@ -18,6 +18,11 @@ class ColorTest extends WebTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to install. * * @var array diff --git a/core/modules/color/tests/modules/color_test/themes/color_test_theme/config/schema/color_test_theme.schema.yml b/core/modules/color/tests/modules/color_test/themes/color_test_theme/config/schema/color_test_theme.schema.yml new file mode 100644 index 0000000..33c19d6 --- /dev/null +++ b/core/modules/color/tests/modules/color_test/themes/color_test_theme/config/schema/color_test_theme.schema.yml @@ -0,0 +1,5 @@ +# Schema for the configuration files of the Color test theme. + +color_test_theme.settings: + type: theme_settings + label: 'Color test theme settings' diff --git a/core/modules/comment/config/schema/comment.schema.yml b/core/modules/comment/config/schema/comment.schema.yml index afd6570..9dd0aa5 100644 --- a/core/modules/comment/config/schema/comment.schema.yml +++ b/core/modules/comment/config/schema/comment.schema.yml @@ -24,7 +24,7 @@ action.configuration.comment_unpublish_by_keyword_action: type: mapping label: 'Unpublish comment containing keyword(s) configuration' mapping: - keyword: + keywords: type: sequence label: 'Keywords' sequence: diff --git a/core/modules/comment/src/Tests/CommentActionsTest.php b/core/modules/comment/src/Tests/CommentActionsTest.php index a0b50d6..e5443c1 100644 --- a/core/modules/comment/src/Tests/CommentActionsTest.php +++ b/core/modules/comment/src/Tests/CommentActionsTest.php @@ -17,6 +17,11 @@ class CommentActionsTest extends CommentTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to install. * * @var array diff --git a/core/modules/editor/src/Tests/EditorAdminTest.php b/core/modules/editor/src/Tests/EditorAdminTest.php index ab79287..d4b880c 100644 --- a/core/modules/editor/src/Tests/EditorAdminTest.php +++ b/core/modules/editor/src/Tests/EditorAdminTest.php @@ -17,6 +17,11 @@ class EditorAdminTest extends WebTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/image/config/schema/image.schema.yml b/core/modules/image/config/schema/image.schema.yml index 7da7c47..87f38f6 100644 --- a/core/modules/image/config/schema/image.schema.yml +++ b/core/modules/image/config/schema/image.schema.yml @@ -28,6 +28,10 @@ image.style.*: sequence: - type: image_style.third_party.[%key] +image.effect.*: + type: mapping + label: 'Effect settings' + image.effect.image_crop: type: image_size label: 'Image crop' diff --git a/core/modules/image/src/Tests/ImageDimensionsTest.php b/core/modules/image/src/Tests/ImageDimensionsTest.php index 4d6c76b..2b05757 100644 --- a/core/modules/image/src/Tests/ImageDimensionsTest.php +++ b/core/modules/image/src/Tests/ImageDimensionsTest.php @@ -17,6 +17,11 @@ class ImageDimensionsTest extends WebTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/search/src/Tests/SearchTokenizerTest.php b/core/modules/search/src/Tests/SearchTokenizerTest.php index 66777b3..23338e3 100644 --- a/core/modules/search/src/Tests/SearchTokenizerTest.php +++ b/core/modules/search/src/Tests/SearchTokenizerTest.php @@ -14,6 +14,12 @@ * @group search */ class SearchTokenizerTest extends SearchTestBase { + + /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + /** * Verifies that strings of CJK characters are tokenized. * @@ -114,7 +120,7 @@ function testNoTokenizer() { // Set the minimum word size to 1 (to split all CJK characters) and make // sure CJK tokenizing is turned on. \Drupal::config('search.settings') - ->set('minimum_word_size', 1) + ->set('index.minimum_word_size', 1) ->set('overlap_cjk', TRUE) ->save(); $this->refreshVariables(); diff --git a/core/modules/statistics/config/schema/statistics.schema.yml b/core/modules/statistics/config/schema/statistics.schema.yml index 58f262d..51da9ab 100644 --- a/core/modules/statistics/config/schema/statistics.schema.yml +++ b/core/modules/statistics/config/schema/statistics.schema.yml @@ -34,3 +34,17 @@ statistics.settings: top_recent_limit: type: integer label: 'Number of most recent views to display' + +block.settings.statistics_popular_block: + type: block_settings + label: 'Popular content block settings' + mapping: + top_day_num: + type: integer + label: 'Number of day\s top views to display' + top_all_num: + type: integer + label: 'Number of all time views to display' + top_last_num: + type: integer + label: 'Number of most recent views to display' diff --git a/core/modules/statistics/src/Tests/StatisticsReportsTest.php b/core/modules/statistics/src/Tests/StatisticsReportsTest.php index e3218cf..ed8ba14 100644 --- a/core/modules/statistics/src/Tests/StatisticsReportsTest.php +++ b/core/modules/statistics/src/Tests/StatisticsReportsTest.php @@ -15,6 +15,11 @@ class StatisticsReportsTest extends StatisticsTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Tests the "popular content" block. */ function testPopularContentBlock() { diff --git a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php index 6cc1678..8ab9ebb 100644 --- a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php +++ b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php @@ -18,6 +18,11 @@ class VocabularyCrudTest extends TaxonomyTestBase { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array diff --git a/core/modules/tour/src/Tests/TourTest.php b/core/modules/tour/src/Tests/TourTest.php index 8ed261c..ee8ea7b 100644 --- a/core/modules/tour/src/Tests/TourTest.php +++ b/core/modules/tour/src/Tests/TourTest.php @@ -17,6 +17,11 @@ class TourTest extends TourTestBasic { /** + * {@inheritdoc} + */ + protected $strictConfigSchema = TRUE; + + /** * Modules to enable. * * @var array