Esempio n. 1
0
 public function testGetDocument()
 {
     $type = self::$index->getType('message');
     $document = $type->getDocument(1);
     $message = $this->marshaler->unmarshal($document);
     $this->assertTrue($this->message->equals($message));
 }
Esempio n. 2
0
 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));
 }