Inheritance: extends AbstractQuery
Beispiel #1
0
 /**
  * @group unit
  */
 public function testSetScript()
 {
     $string = '_score * 2.0';
     $params = array('param1' => 'one', 'param2' => 1);
     $lang = 'mvel';
     $script = new Script($string, $params, $lang);
     $query = new ScriptQuery();
     $query->setScript($script);
     $array = $query->toArray();
     $expected = array('script' => array('script' => $string, 'params' => $params, 'lang' => $lang));
     $this->assertEquals($expected, $array);
 }