Exemplo n.º 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');
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
 public function __construct($args)
 {
     Store::getInstance()->set('args', $args);
 }
Exemplo n.º 5
0
 public static function deleteJob($job)
 {
     Store::getInstance()->delete($job);
 }