Exemple #1
0
 /**
  * @covers Paradox\pod\Document::loadFromArray
  */
 public function testLoadFromArray()
 {
     $array = array();
     $array['_id'] = 'mycollection/123456';
     $array['_rev'] = 'myrevision';
     $array['_key'] = '123456';
     $array['mykey'] = 'myvalue';
     $this->document->loadFromArray($array);
     $this->assertEquals('mycollection/123456', $this->document->getId(), "The id does not match");
     $this->assertEquals('myrevision', $this->document->getRevision(), "The revision does not match");
     $this->assertEquals('myvalue', $this->document->get('mykey'), 'The value for "mykey" does not match');
 }