示例#1
0
 public function testSetOptionTwiceMergeOptionValues()
 {
     $b = new Builder();
     $b->conditions(['attr' => 12]);
     $b->conditions(['attr2' => 15]);
     $expected = ['conditions' => ['attr' => 12, 'attr2' => 15]];
     $this->assertEquals($expected, $b->getOptions());
 }
示例#2
0
 /**
  * Set the query builder.
  *
  * @param Builder $builder
  */
 public function setBuilder(Builder $builder)
 {
     $this->_builder = $builder;
     $this->_type = $builder->type;
     $this->_builder->setQuery($this);
 }