Exemple #1
0
 public function __construct($class)
 {
     $this->reflectionModel = new ReflectionModel($class);
     $this->name = $this->table = $this->reflectionModel->getShortName();
     $this->fields = $this->reflectionModel->getPublicPropertyNames();
     $this->rootConfig = $this;
     $this->reflectionModel->initialize($this);
 }
 /**
  * @covers ::getPublicPropertyNames
  */
 public function testGetPublicPropertyNames()
 {
     $reflection = new ReflectionModel('Harp\\Harp\\Test\\TestModel\\City');
     $this->assertEquals(['id', 'name', 'countryId'], $reflection->getPublicPropertyNames());
 }