function setUp()
 {
     parent::setUp();
     $this->plugin->widget_number_incrementing = new Widget_Number_Incrementing($this->plugin);
     $this->plugin->widget_posts = new Widget_Posts($this->plugin);
     wp_widgets_init();
 }
 function setUp()
 {
     $this->wpdb = $GLOBALS['wpdb'];
     require_once __DIR__ . '/data/class-acme-widget.php';
     parent::setUp();
     $this->assertEmpty($this->plugin->widget_factory->widgets);
 }
 /**
  * Set up.
  */
 function setUp()
 {
     global $wp_customize;
     require_once ABSPATH . WPINC . '/class-wp-customize-manager.php';
     parent::setUp();
     $this->widget_posts = new Widget_Posts($this->plugin);
     $this->plugin->widget_number_incrementing = new Widget_Number_Incrementing($this->plugin);
     $this->widget_posts->init();
     wp_widgets_init();
     $this->widget_posts->register_instance_post_type();
     $this->widget_posts->migrate_widgets_from_options();
     wp_set_current_user($this->factory->user->create(array('role' => 'administrator')));
     $wp_customize = $this->customize_manager = new \WP_Customize_Manager();
     $this->widget_posts->add_customize_hooks();
     // This did nothing in init since Customizer was not loaded.
     // Make sure the widgets get re-registered now using the new settings source.
     global $wp_registered_widgets;
     $wp_registered_widgets = array();
     wp_widgets_init();
     do_action('wp_loaded');
 }
 function setUp()
 {
     parent::setUp();
     $this->plugin->widget_number_incrementing = new Widget_Number_Incrementing($this->plugin);
 }
 function setUp()
 {
     $this->plugin = get_plugin_instance();
     parent::setUp();
 }
 function setUp()
 {
     parent::setUp();
 }