Beispiel #1
0
 public function testBuildParams()
 {
     $this->_query->setCollate(true);
     $this->_query->setCount(13);
     $this->_query->setDictionary('suggest');
     $this->_query->setQuery('ap ip');
     $this->_query->setOnlyMorePopular(true);
     $request = $this->_builder->build($this->_query);
     $this->assertEquals(array('spellcheck' => 'true', 'q' => 'ap ip', 'spellcheck.dictionary' => 'suggest', 'spellcheck.count' => 13, 'spellcheck.onlyMorePopular' => 'true', 'spellcheck.collate' => 'true', 'wt' => 'json'), $request->getParams());
     $this->assertEquals(Solarium_Client_Request::METHOD_GET, $request->getMethod());
 }
Beispiel #2
0
 public function testSetAndGetCollate()
 {
     $value = false;
     $this->_query->setCollate($value);
     $this->assertEquals($value, $this->_query->getCollate());
 }