Example #1
0
 public function testCreateEntityReturnsAConfiguredEntity()
 {
     $foo = EntityFactory::createEntity('Foo', array('p1' => 'A'));
     $this->assertTrue($foo instanceof \Daveoncode\tests\Foo);
     $this->assertEquals($foo->getP1(), 'A');
 }
Example #2
0
 /**
  * Wrapper method which returns a configured entity.
  * @return Entity Configured entity instance
  * @see Iterator::current()
  */
 public function current()
 {
     return EntityFactory::createEntity($this->entityType, $this->mongoCursor->current());
 }