public function setUp() { parent::setUp(); remove_filter('go_config', array(go_config(), 'go_config_filter'), 10, 2); add_filter('go_config', array($this, 'go_config_filter'), 10, 2); // add the hook to check if we get the expected callback add_action('go_syncuser_user', array($this, 'go_syncuser_user'), 10, 2); // we need to manually call this from our phpunit environment until // i figure out how to get it called automatically by the test WP go_syncuser()->init(); go_syncuser()->config(); }
/** * set up our test environment */ public function setUp() { parent::setUp(); remove_filter('go_config', array(go_config(), 'go_config_filter'), 10, 2); add_filter('go_config', array($this, 'go_config_filter'), 10, 2); }