/** * @covers Paradox\pod\Document::toDriverDocument */ public function testToDriverDocument() { $this->document->setId('mycollection/123456'); $this->document->setRevision('myrevision'); $this->document->set('mykey', 'myvalue'); $converted = $this->document->toDriverDocument(); $this->assertInstanceOf('triagens\\ArangoDb\\Document', $converted, 'The converted document is not of type \\triagens\\ArangoDb\\triagens\\ArangoDb\\Document'); $this->assertEquals('mycollection/123456', $converted->getInternalId(), "The converted document's id does not match"); $this->assertEquals('myrevision', $converted->getRevision(), "The converted document's revision does not match"); $this->assertEquals('myvalue', $converted->get('mykey'), "The converted document's data does not match"); }