Beispiel #1
0
 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');
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 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);
 }
Beispiel #4
0
 public function __construct($args)
 {
     Store::getInstance()->set('args', $args);
 }
Beispiel #5
0
 public static function deleteJob($job)
 {
     Store::getInstance()->delete($job);
 }