Make WordPress Core

Changeset 51376


Ignore:
Timestamp:
07/07/2021 07:28:46 PM (5 years ago)
Author:
desrosj
Message:

Tests: Expand tests for get_block_editor_settings().

This adds unit tests to ensure get_block_editor_settings() properly maps some previously experimental features to their correct locations in the array of contextualized block editor settings returned by the function.

Follow up to [51149], [51213].

Props felipeelia, SergeyBiryukov.
Merges [51369] to the 5.8 branch.
Fixes #53458.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/tests/phpunit/tests/theme/wpThemeJsonResolver.php

    r51374 r51376  
    109109                $this->assertSame(
    110110                        array(
    111                                 'color'  => array(
    112                                         'palette' => array(
     111                                'color'      => array(
     112                                        'palette'        => array(
    113113                                                'theme' => array(
    114114                                                        array(
     
    124124                                                ),
    125125                                        ),
    126                                         'custom'  => false,
     126                                        'gradients'      => array(
     127                                                'theme' => array(
     128                                                        array(
     129                                                                'name'     => 'Custom gradient',
     130                                                                'gradient' => 'linear-gradient(135deg,rgba(0,0,0) 0%,rgb(0,0,0) 100%)',
     131                                                                'slug'     => 'custom-gradient',
     132                                                        ),
     133                                                ),
     134                                        ),
     135                                        'custom'         => false,
     136                                        'customGradient' => false,
    127137                                ),
    128                                 'blocks' => array(
     138                                'typography' => array(
     139                                        'fontSizes'        => array(
     140                                                'theme' => array(
     141                                                        array(
     142                                                                'name' => 'Custom',
     143                                                                'slug' => 'custom',
     144                                                                'size' => '100px',
     145                                                        ),
     146                                                ),
     147                                        ),
     148                                        'customFontSize'   => false,
     149                                        'customLineHeight' => true,
     150                                ),
     151                                'spacing'    => array(
     152                                        'units'         => array(
     153                                                'rem',
     154                                        ),
     155                                        'customPadding' => true,
     156                                ),
     157                                'blocks'     => array(
    129158                                        'core/paragraph' => array(
    130159                                                'color' => array(
Note: See TracChangeset for help on using the changeset viewer.