コード例 #1
0
 /**
  * Set up test environment.
  */
 public function setUp()
 {
     parent::setUp();
     $this->structure = new JsonFieldStructure();
     if (!class_exists("{$this->namespace}\\StatsSnapshot", false)) {
         $this->structure->build();
     }
     $this->stats_snapshot_base_class_reflection = new ReflectionClass("{$this->namespace}\\Base\\StatsSnapshot");
     $this->stats_snapshot_class_reflection = new ReflectionClass("{$this->namespace}\\StatsSnapshot");
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->structure = new JsonFieldStructure();
     if (!class_exists("{$this->namespace}\\StatsSnapshot", false)) {
         $this->structure->build();
     }
     $this->stats_snapshot_class_name = "{$this->namespace}\\StatsSnapshot";
     $this->stats_snapshot_base_class_reflection = new ReflectionClass("{$this->namespace}\\Base\\StatsSnapshot");
     $this->stats_snapshot_class_reflection = new ReflectionClass($this->stats_snapshot_class_name);
     $type_table_build = new TypeTableBuilder($this->structure);
     $type_table_build->setConnection($this->connection);
     $stats_snapshots_type = $this->structure->getType('stats_snapshots');
     $this->assertInstanceOf(TypeInterface::class, $stats_snapshots_type);
     $create_table_statement = $type_table_build->prepareCreateTableStatement($stats_snapshots_type);
     $this->connection->execute($create_table_statement);
     $this->pool = new Pool($this->connection);
     $this->pool->registerType($this->stats_snapshot_class_name);
 }