setFields('description,name'); $component->setMinimumTermFrequency(1); $component->setMinimumDocumentFrequency(3); $component->setMinimumWordLength(2); $component->setMaximumWordLength(15); $component->setMaximumQueryTerms(4); $component->setMaximumNumberOfTokens(5); $component->setBoost(true); $component->setQueryFields('description'); $component->setCount(6); $request = $builder->buildComponent($component, $request); $this->assertEquals( array( 'mlt' => 'true', 'mlt.fl' => 'description,name', 'mlt.mintf' => 1, 'mlt.mindf' => 3, 'mlt.minwl' => 2, 'mlt.maxwl' => 15, 'mlt.maxqt' => 4, 'mlt.maxntp' => 5, 'mlt.boost' => 'true', 'mlt.qf' => 'description', 'mlt.count' => 6, ), $request->getParams() ); } }