/** * @covers Drafty_In_Here::cron_callback */ public function test_cron_callback_with_draft_posts_and_test_parameter_true_return_true() { $this->create_draft_post(); $test = true; $this->assertTrue($this->instance->cron_callback($test)); $this->delete_draft_post(); }
/** * Load or create our plugin options * @return void */ private static function options_init() { $slug = 'drafty_options'; $prototype = array('email_address' => Options::get('admin_email '), 'drafty_frequency' => ''); self::$options = Options::get($slug); if (!empty(self::$options)) { return; } Options::save($slug, $prototype); }