Changeset 51599 for trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php
- Timestamp:
- 08/11/2021 09:06:31 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php
r51568 r51599 43 43 public function filter_set_locale_to_polish() { 44 44 return 'pl_PL'; 45 }46 47 /**48 * @ticket 5299149 */50 public function test_fields_are_extracted() {51 $actual = WP_Theme_JSON_Resolver::get_fields_to_translate();52 53 $expected = array(54 array(55 'path' => array( 'settings', 'typography', 'fontSizes' ),56 'key' => 'name',57 'context' => 'Font size name',58 ),59 array(60 'path' => array( 'settings', 'color', 'palette' ),61 'key' => 'name',62 'context' => 'Color name',63 ),64 array(65 'path' => array( 'settings', 'color', 'gradients' ),66 'key' => 'name',67 'context' => 'Gradient name',68 ),69 array(70 'path' => array( 'settings', 'color', 'duotone' ),71 'key' => 'name',72 'context' => 'Duotone name',73 ),74 array(75 'path' => array( 'settings', 'blocks', '*', 'typography', 'fontSizes' ),76 'key' => 'name',77 'context' => 'Font size name',78 ),79 array(80 'path' => array( 'settings', 'blocks', '*', 'color', 'palette' ),81 'key' => 'name',82 'context' => 'Color name',83 ),84 array(85 'path' => array( 'settings', 'blocks', '*', 'color', 'gradients' ),86 'key' => 'name',87 'context' => 'Gradient name',88 ),89 );90 91 $this->assertSame( $expected, $actual );92 45 } 93 46
Note: See TracChangeset
for help on using the changeset viewer.