Beispiel #1
0
 public function testAddDocument()
 {
     $type = self::$index->getType('message');
     $document = $this->marshaler->marshal($this->message);
     $document->setId(1);
     $type->addDocument($document);
 }
 public function testMarshal()
 {
     $message = $this->createEmailMessage();
     $document = $this->marshaler->marshal($message);
     $this->assertInstanceOf('Elastica\\Document', $document);
     $message2 = $this->marshaler->unmarshal($document);
     $this->assertTrue($message->equals($message2));
 }