Changeset 55345 for trunk/tests/phpunit/tests/theme/wpThemeJson.php
- Timestamp:
- 02/15/2023 03:55:12 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/wpThemeJson.php
r55285 r55345 2428 2428 2429 2429 /** 2430 * @ticket 57321 2431 * 2432 * @covers WP_Theme_JSON::remove_insecure_properties 2433 */ 2434 public function test_remove_insecure_properties_should_allow_indirect_properties() { 2435 $actual = WP_Theme_JSON::remove_insecure_properties( 2436 array( 2437 'version' => WP_Theme_JSON::LATEST_SCHEMA, 2438 'styles' => array( 2439 'spacing' => array( 2440 'blockGap' => '3em', 2441 ), 2442 'blocks' => array( 2443 'core/social-links' => array( 2444 'spacing' => array( 2445 'blockGap' => array( 2446 'left' => '2em', 2447 'top' => '1em', 2448 ), 2449 ), 2450 ), 2451 ), 2452 ), 2453 'settings' => array( 2454 'layout' => array( 2455 'contentSize' => '800px', 2456 'wideSize' => '1000px', 2457 ), 2458 ), 2459 ) 2460 ); 2461 2462 $expected = array( 2463 'version' => WP_Theme_JSON::LATEST_SCHEMA, 2464 'styles' => array( 2465 'spacing' => array( 2466 'blockGap' => '3em', 2467 ), 2468 'blocks' => array( 2469 'core/social-links' => array( 2470 'spacing' => array( 2471 'blockGap' => array( 2472 'left' => '2em', 2473 'top' => '1em', 2474 ), 2475 ), 2476 ), 2477 ), 2478 ), 2479 'settings' => array( 2480 'layout' => array( 2481 'contentSize' => '800px', 2482 'wideSize' => '1000px', 2483 ), 2484 ), 2485 ); 2486 2487 $this->assertSameSetsWithIndex( $expected, $actual ); 2488 } 2489 2490 /** 2430 2491 * @ticket 56467 2431 2492 */
Note: See TracChangeset
for help on using the changeset viewer.