예제 #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', 'json.nl' => 'flat', 'omitHeader' => 'true'), $request->getParams());
     $this->assertEquals(Request::METHOD_GET, $request->getMethod());
 }
예제 #2
0
 public function testSetAndGetCollate()
 {
     $value = false;
     $this->query->setCollate($value);
     $this->assertEquals($value, $this->query->getCollate());
 }