mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/12012] Handle begin and commit transactions in tests
PHPBB3-12012
This commit is contained in:
parent
7dc163f2b7
commit
a75ac5efd2
1 changed files with 14 additions and 1 deletions
|
@ -14,6 +14,7 @@ class phpbb_database_test_connection_manager
|
|||
{
|
||||
private $config;
|
||||
private $dbms;
|
||||
/** @var PDO */
|
||||
private $pdo;
|
||||
|
||||
/**
|
||||
|
@ -363,12 +364,24 @@ class phpbb_database_test_connection_manager
|
|||
$table_name,
|
||||
$table_data
|
||||
);
|
||||
|
||||
foreach ($queries as $query)
|
||||
{
|
||||
if ($query === 'begin')
|
||||
{
|
||||
$this->pdo->beginTransaction();
|
||||
}
|
||||
else if ($query === 'commit')
|
||||
{
|
||||
$this->pdo->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->pdo->exec($query);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Map a phpBB dbms driver name to dbms data array
|
||||
|
|
Loading…
Add table
Reference in a new issue