1
0
mirror of synced 2024-12-17 08:28:43 +03:00
doctrine2/tests/Doctrine/Tests/DBAL/Functional/Schema/OracleSchemaManagerTest.php

39 lines
1015 B
PHP

<?php
namespace Doctrine\Tests\DBAL\Functional\Schema;
use Doctrine\DBAL\Schema;
require_once __DIR__ . '/../../../TestInit.php';
class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
{
public function setUp()
{
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);
}
public function testRenameTable()
{
$this->_sm->tryMethod('DropTable', 'list_tables_test');
$this->_sm->tryMethod('DropTable', 'list_tables_test_new_name');
$this->createTestTable('list_tables_test');
$this->_sm->renameTable('list_tables_test', 'list_tables_test_new_name');
$tables = $this->_sm->listTables();
$this->assertHasTable($tables, 'list_tables_test_new_name');
}
}