function test_if_wp_query_is_done_right() { User::find(); $args = Store::getInstance()->get('args'); $this->assertEquals($args['post_type'], 'user', 'Check if search for the right post type'); $this->assertEquals($args['post_status'], 'publish', 'Check if search for the right post status'); $this->assertEquals($args['paged'], 1, 'Check if search for the right post page'); $this->assertEquals($args['limit'], -1, 'Check if search without limit'); }
public static function getInstance($args = null) { if (!isset($args['class'])) { $args['class'] = 'Weaver'; } if (!isset($args['db'])) { $args['db'] = WEAVER_IRI; } return parent::getInstance($args); }
public static function getInstance($args = null) { if (!isset($args['class'])) { $args['class'] = 'Media'; } if (!isset($args['db'])) { $args['db'] = MEDIA_IRI; } return parent::getInstance($args); }
public function __construct($args) { Store::getInstance()->set('args', $args); }
public static function deleteJob($job) { Store::getInstance()->delete($job); }