Exemple #1
0
 /**
  * Add request settings for the debug component
  *
  * @param  DebugComponent $component
  * @param  Request        $request
  * @return Request
  */
 public function buildComponent($component, $request)
 {
     $request->addParam('debugQuery', 'true');
     $request->addParam('debug.explain.structured', 'true');
     $request->addParam('explainOther', $component->getExplainOther());
     return $request;
 }
Exemple #2
0
 public function testBuildComponent()
 {
     $builder = new RequestBuilder();
     $request = new Request();
     $component = new Component();
     $component->setExplainOther('id:45');
     $request = $builder->buildComponent($component, $request);
     $this->assertEquals(array('debugQuery' => 'true', 'debug.explain.structured' => 'true', 'explainOther' => 'id:45'), $request->getParams());
 }
Exemple #3
0
 public function testSetAndGetExplainOther()
 {
     $value = 'id:24';
     $this->debug->setExplainOther($value);
     $this->assertEquals($value, $this->debug->getExplainOther());
 }