public function createTestDatabase() { if (Dba::hasDriver('qdbm')) { return new Dba($this->getTempFileName(), Dba::MODE_CREATE | Dba::MODE_TRUNCATE, ['driverName' => 'qdbm']); } if (Dba::hasDriver('gdbm')) { return new Dba($this->getTempFileName(), Dba::MODE_CREATE | Dba::MODE_TRUNCATE, ['driverName' => 'gdbm']); } if (Dba::hasDriver('inifile')) { return new Dba($this->getTempFileName(), Dba::MODE_CREATE | Dba::MODE_TRUNCATE, ['driverName' => 'inifile']); } $this->markTestSkipped('Driver GDBM, GDBM, Inifile is not supported on this system'); }
/** * @expectedException RuntimeException */ public function testAddValue() { $dba = new Dba($this->getTempFileName(), Dba::MODE_WRITE, ['driverName' => 'cdb']); $dba->addValue('foo', 23); $dba->addValue('bar', 42); $dba->addValue('foobar', 1337); }