- Timestamp:
- 04/02/2019 10:14:19 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/widgets/media-video-widget.php
r43571 r45101 53 53 54 54 /** 55 * Test schema filtering. 56 * 57 * @covers WP_Widget_Media_Video::get_instance_schema 58 * 59 * @ticket 45029 60 */ 61 function test_get_instance_schema_filtering() { 62 $widget = new WP_Widget_Media_Video(); 63 $schema = $widget->get_instance_schema(); 64 65 add_filter( 'widget_media_video_instance_schema', array( $this, 'filter_instance_schema' ), 10, 2 ); 66 $schema = $widget->get_instance_schema(); 67 68 $this->assertTrue( $schema['loop']['default'] ); 69 } 70 71 /** 72 * Filters instance schema. 73 * 74 * @since 5.2.0 75 * 76 * @param array $schema Schema. 77 * @param WP_Widget_Media_Video $widget Widget. 78 * 79 * @return array 80 */ 81 public function filter_instance_schema( $schema, $widget ) { 82 // Override the default loop value (false). 83 $schema['loop']['default'] = true; 84 return $schema; 85 } 86 87 /** 55 88 * Test constructor. 56 89 *
Note: See TracChangeset
for help on using the changeset viewer.