diff options
author | Maat <maat-pub@mageia.biz> | 2020-05-09 01:15:08 +0200 |
---|---|---|
committer | Maat <maat-pub@mageia.biz> | 2020-05-09 01:15:08 +0200 |
commit | 6985226b17e8a0ef0a720bf1d12fe0c216e13dab (patch) | |
tree | 116d2565ac02c40abe0548863c6badf8ec3e1d1e /tests/test_framework/phpbb_database_test_case.php | |
parent | 8ea437e30605e0f66b5220bf904a61d7c1d11ddd (diff) | |
parent | 8d00784dfe2c8bcb10843ff70b4cfa998d703285 (diff) | |
download | forums-master.tar forums-master.tar.gz forums-master.tar.bz2 forums-master.tar.xz forums-master.zip |
Diffstat (limited to 'tests/test_framework/phpbb_database_test_case.php')
-rw-r--r-- | tests/test_framework/phpbb_database_test_case.php | 26 |
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); |