Example #1
0
 /**
  * @covers Paradox\toolbox\Query::convertToPods
  */
 public function testConvertToPods()
 {
     $query = "FOR doc in @@collection return doc";
     $results = $this->query->getAll($query, array('@collection' => $this->collectionName));
     $pods = $this->query->convertToPods($this->collectionName, $results);
     $this->assertInternalType('array', $pods, "The result should be an array");
     foreach ($pods as $pod) {
         $this->assertInstanceOf('Paradox\\AModel', $pod, 'Pods should be of the type Paradox\\AModel');
         $this->assertEquals($this->collectionName, $pod->getPod()->getType(), "The pod's type does not match");
     }
 }