public function testConfigOverrides()
 {
     $config = (require __DIR__ . '/data/beaucalquickunion.local.php');
     $options = new DbAdapterOptions($config['beaucalquickunion']['BeaucalQuickUnion\\Adapter\\Db']);
     $this->assertEquals('db_adapter_class_another', $options->getDbAdapterClass());
     $this->assertEquals('db_table_another', $options->getDbTable());
 }
 public function setUp()
 {
     parent::setUp();
     $dbOptions = new UnionDbAdapterOptions();
     $this->gateway = new TableGateway($dbOptions->getDbTable(), $this->getAdapter());
     $this->unionAdapter = new UnionDbAdapter($this->gateway, $dbOptions);
     $unionOptions = new UnionOptions();
     $this->union = new Union($this->unionAdapter, $unionOptions);
 }
 public function setUp()
 {
     parent::setUp();
     $dbOptions = new UnionDbAdapterOptions();
     $this->gateway = new TableGateway($dbOptions->getDbTable(), $this->getAdapter());
     $this->unionDbAdapter = new UnionDbAdapter($this->gateway, $dbOptions);
     $unionOptions = new UnionOptions();
     $this->union = new Union($this->unionDbAdapter, $unionOptions);
     $this->itemNew = self::getRandomString();
 }
 public function setUp()
 {
     parent::setUp();
     $this->adapters[] = new Adapter\Memory(new Options\MemoryAdapter());
     $dbOptions = new Options\DbAdapter();
     $dbAdapter = $this->getAdapter();
     $gateway = new TableGateway($dbOptions->getDbTable(), $dbAdapter);
     $dbAdapter->query("truncate {$dbOptions->getDbTable()}")->execute();
     $this->adapters[] = new Adapter\Db($gateway, $dbOptions);
     // single
     $this->insert('A');
     // pair
     $this->insert('C');
     $this->insert('B');
     $this->setParent('B', 'C');
     // chain
     $this->insert('F');
     $this->insert('E');
     $this->insert('D');
     $this->setParent('E', 'F');
     $this->setParent('D', 'E');
     // simplest tree
     $this->insert('H');
     $this->insert('G');
     $this->insert('I');
     $this->setParent('G', 'H');
     $this->setParent('I', 'H');
     // full tree
     $this->insert('P');
     $this->insert('N');
     $this->insert('M');
     $this->insert('O');
     $this->insert('K');
     $this->insert('J');
     $this->insert('L');
     $this->setParent('N', 'P');
     $this->setParent('M', 'N');
     $this->setParent('O', 'N');
     $this->setParent('K', 'P');
     $this->setParent('J', 'K');
     $this->setParent('L', 'K');
     // more singles
     $this->insert('Y');
     $this->insert('Z');
 }