Ejemplo n.º 1
0
 public static function getPropertyMapDefinition()
 {
     if (static::$getCounter > 0) {
         throw new \Exception('Entity::getPropertyMapDefinition should only be called once.');
     }
     static::$getCounter++;
     return parent::getPropertyMapDefinition();
 }
Ejemplo n.º 2
0
 /**
  * @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']);
 }