public function testDocumentWithBoostThrowsException()
 {
     $document = $this->query->createDocument();
     $document->setBoost(4);
     $this->query->setDocument($document);
     $this->setExpectedException('Solarium\\Exception\\RuntimeException');
     $this->builder->build($this->query);
 }
示例#2
0
 /**
  * @depends testRemoveFieldMapping
  * @param Query $query
  */
 public function testSetFields($query)
 {
     $fields = array('field3' => 'target3', 'field4' => 'target4');
     $query->setFieldMappings($fields);
     $this->assertEquals($fields, $query->getFieldMappings());
 }