Changeset 35100 for trunk/tests/phpunit/tests/widgets.php
- Timestamp:
- 10/13/2015 01:12:12 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/widgets.php
r34817 r35100 466 466 unset( $option_value['_multiwidget'] ); 467 467 468 // Pretend this widget is new. 469 delete_option( 'widget_nav_menu' ); 470 $never_used = get_option( 'widget_nav_menu' ); 471 $this->assertFalse( $never_used ); 472 468 473 wp_widgets_init(); 469 474 $wp_widget_search = $wp_registered_widgets['search-2']['callback'][0]; … … 476 481 $this->assertEquals( $settings[ $widget_number ], $option_value[ $widget_number ] ); 477 482 } 483 484 // After widgets_init(), get_settings() should create the widget option. 485 $never_used = get_option( 'widget_nav_menu' ); 486 $this->assertEquals( 1, $never_used['_multiwidget'] ); 487 $this->assertArrayNotHasKey( 0, $never_used ); 478 488 } 479 489
Note: See TracChangeset
for help on using the changeset viewer.