setQuery('testquery'); $component->setBuild(false); $component->setReload(true); $component->setDictionary('testdict'); $component->setCount(3); $component->setOnlyMorePopular(false); $component->setExtendedResults(true); $component->setCollate(true); $component->setMaxCollations(2); $component->setMaxCollationTries(4); $component->setMaxCollationEvaluations(4); $component->setCollateExtendedResults(true); $component->setAccuracy(.2); $request = $builder->buildComponent($component, $request); $this->assertEquals( array( 'spellcheck' => 'true', 'spellcheck.q' => 'testquery', 'spellcheck.build' => 'false', 'spellcheck.reload' => 'true', 'spellcheck.dictionary' => 'testdict', 'spellcheck.count' => 3, 'spellcheck.onlyMorePopular' => 'false', 'spellcheck.extendedResults' => 'true', 'spellcheck.collate' => 'true', 'spellcheck.maxCollations' => 2, 'spellcheck.maxCollationTries' => 4, 'spellcheck.maxCollationEvaluations' => 4, 'spellcheck.collateExtendedResults' => 'true', 'spellcheck.accuracy' => .2, ), $request->getParams() ); } }