public static function getPropertyMapDefinition() { if (static::$getCounter > 0) { throw new \Exception('Entity::getPropertyMapDefinition should only be called once.'); } static::$getCounter++; return parent::getPropertyMapDefinition(); }
/** * @covers TheSportsDb\Entity\Entity::transformHelper */ public function testTransformHelper() { $result = Entity::transformHelper('id', (object) array('testProp' => 'testVal'), 'id', array('testProp' => 'destTestProp')); $this->assertEquals('id', $result['id']); $this->assertEquals((object) array('id' => 'id', 'destTestProp' => 'testVal'), $result['object']); }