Exemplo n.º 1
0
 public function testToArray()
 {
     $expected = array("indices" => array("indices" => array("index1", "index2"), "filter" => array("term" => array("tag" => "wow")), "no_match_filter" => array("term" => array("tag" => "such filter"))));
     $filter = new Indices(new Term(array("tag" => "wow")), array("index1", "index2"));
     $filter->setNoMatchFilter(new Term(array("tag" => "such filter")));
     $this->assertEquals($expected, $filter->toArray());
 }
 /**
  * @group unit
  */
 public function testToArray()
 {
     $expected = array('indices' => array('indices' => array('index1', 'index2'), 'filter' => array('term' => array('tag' => 'wow')), 'no_match_filter' => array('term' => array('tag' => 'such filter'))));
     $filter = new Indices(new Term(array('tag' => 'wow')), array('index1', 'index2'));
     $filter->setNoMatchFilter(new Term(array('tag' => 'such filter')));
     $this->assertEquals($expected, $filter->toArray());
 }