Example #1
0
 protected function setUp()
 {
     parent::setUp();
     $this->connection->exec("ALTER TABLE test AUTO_INCREMENT = 1");
     $this->connection->exec("ALTER TABLE test2 AUTO_INCREMENT = 1");
     for ($i = 0; $i < self::ROWCOUNT; $i++) {
         $c_int = $i % self::DENOMINATOR;
         $c_varchar = "varchar " . $c_int;
         $c_unique = "unique " . $i;
         $this->connection->exec("INSERT INTO test (c_varchar, c_int, c_unique)\n              VALUES ('{$c_varchar}', {$c_int}, '{$c_unique}')");
         $this->connection->exec("INSERT INTO test2 (c_varchar, c_int, c_unique)\n              VALUES ('{$c_varchar}', {$c_int}, '{$c_unique}')");
     }
 }
Example #2
0
 protected function setUp()
 {
     parent::setUp();
     $this->connection2 = clone $this->connection;
     $this->connection2->setName("Conn 2");
 }
Example #3
0
 function tearDown()
 {
     parent::tearDown();
     $this->persistenceDriver = null;
     Entity::unsetDefaultPersistenceDriver();
 }