aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_database_test_case.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_framework/phpbb_database_test_case.php')
-rw-r--r--tests/test_framework/phpbb_database_test_case.php26
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php
index 606c40a623..c098ff64bd 100644
--- a/tests/test_framework/phpbb_database_test_case.php
+++ b/tests/test_framework/phpbb_database_test_case.php
@@ -11,7 +11,9 @@
*
*/
-abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_TestCase
+use PHPUnit\DbUnit\TestCase;
+
+abstract class phpbb_database_test_case extends TestCase
{
static private $already_connected;
@@ -31,10 +33,10 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
{
parent::__construct($name, $data, $dataName);
$this->backupStaticAttributesBlacklist += array(
- 'PHP_CodeCoverage' => array('instance'),
- 'PHP_CodeCoverage_Filter' => array('instance'),
- 'PHP_CodeCoverage_Util' => array('ignoredLines', 'templateMethods'),
- 'PHP_Timer' => array('startTimes',),
+ 'SebastianBergmann\CodeCoverage\CodeCoverage' => array('instance'),
+ 'SebastianBergmann\CodeCoverage\Filter' => array('instance'),
+ 'SebastianBergmann\CodeCoverage\Util' => array('ignoredLines', 'templateMethods'),
+ 'SebastianBergmann\Timer\Timer' => array('startTimes',),
'PHP_Token_Stream' => array('customTokens'),
'PHP_Token_Stream_CachingFactory' => array('cache'),
@@ -99,7 +101,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
parent::tearDownAfterClass();
}
- protected function tearDown()
+ protected function tearDown(): void
{
parent::tearDown();
@@ -113,7 +115,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
}
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
@@ -146,7 +148,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
* Create xml data set for insertion into database
*
* @param string $path Path to fixture XML
- * @return PHPUnit_Extensions_Database_DataSet_DefaultDataSet|PHPUnit_Extensions_Database_DataSet_XmlDataSet
+ * @return PHPUnit\DbUnit\DataSet\DefaultDataSet|PHPUnit\DbUnit\DataSet\XmlDataSet
*/
public function createXMLDataSet($path)
{
@@ -155,11 +157,11 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
// Extend XML data set on MSSQL
if (strpos($this->get_database_config()['dbms'], 'mssql') !== false)
{
- $newXmlData = new PHPUnit_Extensions_Database_DataSet_DefaultDataSet();
+ $newXmlData = new PHPUnit\DbUnit\DataSet\DefaultDataSet([]);
$db = $this->new_dbal();
foreach ($this->fixture_xml_data as $key => $value)
{
- /** @var \PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData $tableMetaData */
+ /** @var PHPUnit\DbUnit\DataSet\DefaultTableMetaData $tableMetaData */
$tableMetaData = $value->getTableMetaData();
$columns = $tableMetaData->getColumns();
$primaryKeys = $tableMetaData->getPrimaryKeys();
@@ -201,8 +203,8 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
$columns[] = 'mssqlindex';
}
- $newMetaData = new PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData($key, $columns, $primaryKeys);
- $newTable = new PHPUnit_Extensions_Database_DataSet_DefaultTable($newMetaData);
+ $newMetaData = new PHPUnit\DbUnit\DataSet\DefaultTableMetaData($key, $columns, $primaryKeys);
+ $newTable = new PHPUnit\DbUnit\DataSet\DefaultTable($newMetaData);
for ($i = 0; $i < $value->getRowCount(); $i++)
{
$dataRow = $value->getRow($i);