1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/12012] Handle begin and commit transactions in tests

PHPBB3-12012
This commit is contained in:
Joas Schilling
2014-04-16 20:59:28 +02:00
parent 7dc163f2b7
commit a75ac5efd2

View File

@@ -14,6 +14,7 @@ class phpbb_database_test_connection_manager
{
private $config;
private $dbms;
/** @var PDO */
private $pdo;
/**
@@ -363,9 +364,21 @@ class phpbb_database_test_connection_manager
$table_name,
$table_data
);
foreach ($queries as $query)
{
$this->pdo->exec($query);
if ($query === 'begin')
{
$this->pdo->beginTransaction();
}
else if ($query === 'commit')
{
$this->pdo->commit();
}
else
{
$this->pdo->exec($query);
}
}
}
}