2009-05-30 06:27:50 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\Tests\DBAL\Functional\Schema;
|
|
|
|
|
|
|
|
use Doctrine\DBAL\Schema;
|
|
|
|
|
|
|
|
require_once __DIR__ . '/../../../TestInit.php';
|
|
|
|
|
2009-06-15 22:25:47 +04:00
|
|
|
class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
|
2009-05-30 06:27:50 +04:00
|
|
|
{
|
2009-11-03 19:56:05 +03:00
|
|
|
public function setUp()
|
2009-05-30 06:27:50 +04:00
|
|
|
{
|
2009-11-03 19:56:05 +03:00
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
if(!isset($GLOBALS['db_username'])) {
|
|
|
|
$this->markTestSkipped('Foo');
|
|
|
|
}
|
|
|
|
|
|
|
|
$username = $GLOBALS['db_username'];
|
|
|
|
|
|
|
|
$query = "GRANT ALL PRIVILEGES TO ".$username;
|
|
|
|
|
|
|
|
$conn = \Doctrine\Tests\TestUtil::getTempConnection();
|
|
|
|
$conn->executeUpdate($query);
|
2009-05-30 06:27:50 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testRenameTable()
|
|
|
|
{
|
2009-11-03 19:56:05 +03:00
|
|
|
$this->_sm->tryMethod('DropTable', 'list_tables_test');
|
|
|
|
$this->_sm->tryMethod('DropTable', 'list_tables_test_new_name');
|
2009-05-30 06:27:50 +04:00
|
|
|
|
|
|
|
$this->createTestTable('list_tables_test');
|
|
|
|
$this->_sm->renameTable('list_tables_test', 'list_tables_test_new_name');
|
|
|
|
|
|
|
|
$tables = $this->_sm->listTables();
|
2009-12-01 02:12:26 +03:00
|
|
|
|
|
|
|
$this->assertHasTable($tables, 'list_tables_test_new_name');
|
2009-05-30 06:27:50 +04:00
|
|
|
}
|
|
|
|
}
|