/**
  * Set up test environment.
  */
 public function setUp()
 {
     parent::setUp();
     $this->pool = new Pool($this->connection);
     $this->position_context_structure = new PositionContextStructure();
     if (!class_exists($this->head_type_class_name, false) && !class_exists($this->tail_type_class_name, false)) {
         $this->position_context_structure->build(null, $this->connection);
     }
     if ($this->connection->tableExists('position_context_head_entries')) {
         $this->connection->dropTable('position_context_head_entries');
     }
     if ($this->connection->tableExists('position_context_tail_entries')) {
         $this->connection->dropTable('position_context_tail_entries');
     }
     $type_table_builder = new TypeTableBuilder($this->position_context_structure);
     $type_table_builder->setConnection($this->connection);
     $type_table_builder->buildType($this->position_context_structure->getType('position_context_head_entries'));
     $type_table_builder->buildType($this->position_context_structure->getType('position_context_tail_entries'));
     $this->assertTrue($this->connection->tableExists('position_context_head_entries'));
     $this->assertTrue($this->connection->tableExists('position_context_tail_entries'));
     $this->pool->registerType($this->head_type_class_name);
     $this->pool->registerType($this->tail_type_class_name);
     $this->assertTrue($this->pool->isTypeRegistered($this->head_type_class_name));
     $this->assertTrue($this->pool->isTypeRegistered($this->tail_type_class_name));
 }
 /**
  * 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");
 }
 /**
  * Set up test environment.
  */
 public function setUp()
 {
     parent::setUp();
     $this->pool = new Pool($this->connection);
     $this->json_serialization_structure = new JsonSerializationStructure();
     if (!class_exists($this->type_class_name, false)) {
         $this->json_serialization_structure->build(null, $this->connection);
     }
     if ($this->connection->tableExists('key_values')) {
         $this->connection->dropTable('key_values');
     }
     $type_table_builder = new TypeTableBuilder($this->json_serialization_structure);
     $type_table_builder->setConnection($this->connection);
     $type_table_builder->buildType($this->json_serialization_structure->getType('key_values'));
     $this->assertTrue($this->connection->tableExists('key_values'));
     $this->pool->registerType($this->type_class_name);
     $this->assertTrue($this->pool->isTypeRegistered($this->type_class_name));
 }
 /**
  * {@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);
 }