Replace $conn->query() with $conn->executeQuery() and $conn->executeStatement()

parent 2d6967f0
......@@ -12,5 +12,5 @@ use Doctrine\DBAL\DriverManager;
'user' => 'ORACLE',
'password' => 'ORACLE',
'dbname' => 'XE',
])->query('ALTER USER ORACLE IDENTIFIED BY ORACLE');
])->executeStatement('ALTER USER ORACLE IDENTIFIED BY ORACLE');
})();
......@@ -30,7 +30,7 @@ class ConnectionLostTest extends FunctionalTestCase
public function testConnectionLost(): void
{
$this->connection->query('SET SESSION wait_timeout=1');
$this->connection->executeStatement('SET SESSION wait_timeout=1');
sleep(2);
......
......@@ -53,7 +53,7 @@ class PortabilityTest extends FunctionalTestCase
$rows = $this->connection->fetchAllAssociative('SELECT * FROM portability_table');
$this->assertFetchResultRows($rows);
$result = $this->connection->query('SELECT * FROM portability_table');
$result = $this->connection->executeQuery('SELECT * FROM portability_table');
while (($row = $result->fetchAssociative())) {
$this->assertFetchResultRow($row);
......@@ -73,7 +73,7 @@ class PortabilityTest extends FunctionalTestCase
$rows = $this->connection->fetchAllAssociative('SELECT * FROM portability_table');
$this->assertFetchResultRows($rows);
$result = $this->connection->query('SELECT * FROM portability_table');
$result = $this->connection->executeQuery('SELECT * FROM portability_table');
while (($row = $result->fetchAssociative())) {
$this->assertFetchResultRow($row);
}
......@@ -120,7 +120,7 @@ class PortabilityTest extends FunctionalTestCase
*/
public function testFetchColumn(string $field, array $expected): void
{
$result = $this->connection->query('SELECT ' . $field . ' FROM portability_table');
$result = $this->connection->executeQuery('SELECT ' . $field . ' FROM portability_table');
$column = $result->fetchFirstColumn();
self::assertEquals($expected, $column);
......
......@@ -520,7 +520,7 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public function testEnsureTableOptionsAreReflectedInMetadata(): void
{
$this->connection->query('DROP TABLE IF EXISTS test_table_metadata');
$this->connection->executeStatement('DROP TABLE IF EXISTS test_table_metadata');
$sql = <<<'SQL'
CREATE TABLE test_table_metadata(
......@@ -534,7 +534,7 @@ AUTO_INCREMENT=42
PARTITION BY HASH (col1)
SQL;
$this->connection->query($sql);
$this->connection->executeStatement($sql);
$onlineTable = $this->schemaManager->listTableDetails('test_table_metadata');
self::assertEquals('InnoDB', $onlineTable->getOption('engine'));
......@@ -549,9 +549,9 @@ SQL;
public function testEnsureTableWithoutOptionsAreReflectedInMetadata(): void
{
$this->connection->query('DROP TABLE IF EXISTS test_table_empty_metadata');
$this->connection->executeStatement('DROP TABLE IF EXISTS test_table_empty_metadata');
$this->connection->query('CREATE TABLE test_table_empty_metadata(col1 INT NOT NULL)');
$this->connection->executeStatement('CREATE TABLE test_table_empty_metadata(col1 INT NOT NULL)');
$onlineTable = $this->schemaManager->listTableDetails('test_table_empty_metadata');
self::assertNotEmpty($onlineTable->getOption('engine'));
......
......@@ -1444,7 +1444,7 @@ abstract class SchemaManagerFunctionalTestCase extends FunctionalTestCase
"SELECT id FROM test_pk_auto_increment WHERE text = '1'"
);
$this->connection->query('DELETE FROM test_pk_auto_increment');
$this->connection->executeStatement('DELETE FROM test_pk_auto_increment');
$this->connection->insert('test_pk_auto_increment', ['text' => '2']);
......
......@@ -234,7 +234,7 @@ SQL;
$this->connection->insert('test_pk_auto_increment', ['text' => '1']);
$this->connection->query('DELETE FROM test_pk_auto_increment');
$this->connection->executeStatement('DELETE FROM test_pk_auto_increment');
$this->connection->insert('test_pk_auto_increment', ['text' => '2']);
......
......@@ -29,7 +29,7 @@ class TransactionTest extends FunctionalTestCase
public function testCommitFalse(): void
{
$this->connection->query('SET SESSION wait_timeout=1');
$this->connection->executeStatement('SET SESSION wait_timeout=1');
self::assertTrue($this->connection->beginTransaction());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment