Ejemplo n.º 1
0
 /**
  * @group unit
  * @covers \Elastica\Query\Builder::toArray
  */
 public function testToArray()
 {
     $builder = new Builder();
     $builder->query()->term()->field('category.id', array(1, 2, 3))->termClose()->queryClose();
     $expected = array('query' => array('term' => array('category.id' => array(1, 2, 3))));
     $this->assertEquals($expected, $builder->toArray());
 }
 /**
  * @covers \Elastica\Query\Builder::toArray
  */
 public function testToArray()
 {
     $this->builder->query()->term()->field('category.id', array(1, 2, 3))->termClose()->queryClose();
     $this->assertEquals(array('query' => array('term' => array('category.id' => array(1, 2, 3)))), $this->builder->toArray());
 }