Esempio n. 1
0
 public function testRenameToOtherSchema()
 {
     $from = 'temp1';
     $to = 'something';
     $schema = new Schema($this->db, 'myschema');
     $schema->create();
     $schema->createTable($from, self::$columns, true);
     $schema2 = new Schema($this->db, 'other');
     $schema2->create();
     $passed = $schema->renameTable($from, $to, $schema2);
     $this->assertTrue($passed);
     $newTable = $schema2->getTable($to);
     $this->assertTrue($newTable->exists());
     $oldTable = $schema->getTable($from);
     $this->assertFalse($oldTable->exists());
 }