Changeset 51569
- Timestamp:
- 08/07/2021 10:40:44 AM (3 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/nav-menus.php
r51568 r51569 1145 1145 $this->assertTrue( (bool) preg_match( '/data-customize-partial-placement-context="(.+?)"/', $result, $matches ) ); 1146 1146 $context = json_decode( html_entity_decode( $matches[1] ), true ); 1147 $this->assertSame( $original_args, wp_array_slice_assoc( $context, array_keys( $original_args ) ) ); // Because assertArraySubset is not available in PHP 5.2. 1147 1148 foreach ( $original_args as $key => $value ) { 1149 $this->assertArrayHasKey( $key, $context ); 1150 $this->assertSame( $value, $context[ $key ] ); 1151 } 1152 1148 1153 $this->assertTrue( $context['can_partial_refresh'] ); 1149 1154 } -
trunk/tests/phpunit/tests/widgets/wpWidgetMedia.php
r51493 r51569 96 96 $this->assertSame( $name, $widget->name ); 97 97 98 $this->assertArraySubset( $widget_options, $widget->widget_options ); 99 $this->assertArraySubset( $control_options, $widget->control_options ); 98 foreach ( $widget_options as $key => $value ) { 99 $this->assertArrayHasKey( $key, $widget->widget_options ); 100 $this->assertSame( $value, $widget->widget_options[ $key ] ); 101 } 102 103 foreach ( $control_options as $key => $value ) { 104 $this->assertArrayHasKey( $key, $widget->control_options ); 105 $this->assertSame( $value, $widget->control_options[ $key ] ); 106 } 100 107 } 101 108
Note: See TracChangeset
for help on using the changeset viewer.