public function testCreateEntityReturnsAConfiguredEntity() { $foo = EntityFactory::createEntity('Foo', array('p1' => 'A')); $this->assertTrue($foo instanceof \Daveoncode\tests\Foo); $this->assertEquals($foo->getP1(), 'A'); }
/** * 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()); }