Beispiel #1
0
 /**
  * Get a new query builder for the model.
  *
  * @return QueryBuilder
  */
 public function newQuery()
 {
     return QueryBuilder::make()->setModel($this);
 }
 /**
  * @test
  */
 function it_can_set_arbitrary_query_vars()
 {
     $query = new WP_Query('foo=bar');
     $this->assertSame('bar', $query->get('foo'));
     $builder = new QueryBuilder($query);
     $builder->set('foo', 'donut');
     $this->assertSame('donut', $query->get('foo'));
 }