Description: Adapt to PHPUnit 8.x and 9.x API.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

--- a/Horde_Db-2.4.1/test/Horde/Db/Adapter/MysqlBase.php
+++ b/Horde_Db-2.4.1/test/Horde/Db/Adapter/MysqlBase.php
@@ -31,7 +31,7 @@
         throw new LogicException('_available() must be implemented in a sub-class.');
     }
 
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$_reason = 'The MySQL adapter is not available';
         if (static::_available()) {
@@ -131,9 +131,9 @@
 
     public function testQuoteFloat()
     {
-        $this->assertEquals('42.2', $this->_conn->quote(42.2));
+        $this->assertEquals('42.200000', $this->_conn->quote(42.2));
         setlocale(LC_NUMERIC, 'de_DE.UTF-8');
-        $this->assertEquals('42.2', $this->_conn->quote(42.2));
+        $this->assertEquals('42.200000', $this->_conn->quote(42.2));
     }
 
     public function testQuoteString()
@@ -257,9 +257,9 @@
     public function testColumns()
     {
         $col = parent::testColumns();
-        $this->assertEquals(10,        $col->getLimit());
+        $this->assertEquals(null,      $col->getLimit());
         $this->assertEquals(true,      $col->isUnsigned());
-        $this->assertEquals('int(10) unsigned', $col->getSqlType());
+        $this->assertEquals('int unsigned', $col->getSqlType());
     }
 
     public function testCreateTableWithSeparatePk()
--- a/Horde_Db-2.4.1/test/Horde/Db/Adapter/Oci8Test.php
+++ b/Horde_Db-2.4.1/test/Horde/Db/Adapter/Oci8Test.php
@@ -19,7 +19,7 @@
  */
 class Horde_Db_Adapter_Oci8Test extends Horde_Db_Adapter_TestBase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$_reason = 'The OCI8 adapter is not available';
         if (extension_loaded('oci8')) {
@@ -114,9 +114,9 @@
 
     public function testQuoteFloat()
     {
-        $this->assertEquals('42.2', $this->_conn->quote(42.2));
+        $this->assertEquals('42.200000', $this->_conn->quote(42.2));
         setlocale(LC_NUMERIC, 'de_DE.UTF-8');
-        $this->assertEquals('42.2', $this->_conn->quote(42.2));
+        $this->assertEquals('42.200000', $this->_conn->quote(42.2));
     }
 
     public function testQuoteString()
--- a/Horde_Db-2.4.1/test/Horde/Db/Adapter/Pdo/PgsqlTest.php
+++ b/Horde_Db-2.4.1/test/Horde/Db/Adapter/Pdo/PgsqlTest.php
@@ -24,7 +24,7 @@
  */
 class Horde_Db_Adapter_Pdo_PgsqlTest extends Horde_Db_Adapter_TestBase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$_reason = 'The pgsql adapter is not available';
         if (extension_loaded('pdo') &&
@@ -116,9 +116,9 @@
 
     public function testQuoteFloat()
     {
-        $this->assertEquals('42.2', $this->_conn->quote(42.2));
+        $this->assertEquals('42.200000', $this->_conn->quote(42.2));
         setlocale(LC_NUMERIC, 'de_DE.UTF-8');
-        $this->assertEquals('42.2', $this->_conn->quote(42.2));
+        $this->assertEquals('42.200000', $this->_conn->quote(42.2));
     }
 
     public function testQuoteString()
--- a/Horde_Db-2.4.1/test/Horde/Db/Adapter/Pdo/SqliteTest.php
+++ b/Horde_Db-2.4.1/test/Horde/Db/Adapter/Pdo/SqliteTest.php
@@ -24,7 +24,7 @@
  */
 class Horde_Db_Adapter_Pdo_SqliteTest extends Horde_Db_Adapter_TestBase
 {
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$_reason = 'The sqlite adapter is not available';
         if (extension_loaded('pdo') &&
@@ -108,9 +108,9 @@
 
     public function testQuoteFloat()
     {
-        $this->assertEquals('42.2', $this->_conn->quote(42.2));
+        $this->assertEquals('42.200000', $this->_conn->quote(42.2));
         setlocale(LC_NUMERIC, 'de_DE.UTF-8');
-        $this->assertEquals('42.2', $this->_conn->quote(42.2));
+        $this->assertEquals('42.200000', $this->_conn->quote(42.2));
     }
 
     public function testQuoteString()
@@ -208,7 +208,7 @@
                                    array('precision' => '5', 'scale' => '2'));
 
         $afterChange = $this->_getColumn('sports', 'is_college');
-        $this->assertRegExp('/^decimal\(5,\s*2\)$/', $afterChange->getSqlType());
+        $this->assertMatchesRegularExpression('/^decimal\(5,\s*2\)$/', $afterChange->getSqlType());
     }
 
     public function testRenameColumn()
--- a/Horde_Db-2.4.1/test/Horde/Db/Adapter/TestBase.php
+++ b/Horde_Db-2.4.1/test/Horde/Db/Adapter/TestBase.php
@@ -41,7 +41,7 @@
         throw new LogicException('_getConnection() must be implemented in a sub-class.');
     }
 
-    protected function setUp()
+    protected function setUp(): void
     {
         if (self::$_skip ||
             !($res = static::_getConnection())) {
@@ -56,7 +56,7 @@
         $this->_dropTestTables();
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         if ($this->_conn) {
             // clean up
@@ -120,7 +120,7 @@
         $this->assertGreaterThan(0, count(iterator_to_array($result)));
 
         foreach ($result as $row) break;
-        $this->assertInternalType('array', $row);
+        $this->assertIsArray($row);
         $this->assertEquals(1, $row['id']);
     }
 
@@ -134,7 +134,7 @@
         $this->assertGreaterThan(0, count(iterator_to_array($result)));
 
         foreach ($result as $row) break;
-        $this->assertInternalType('array', $row);
+        $this->assertIsArray($row);
         $this->assertEquals(1, $row['id']);
     }
 
@@ -148,7 +148,7 @@
         $this->assertGreaterThan(0, count(iterator_to_array($result)));
 
         foreach ($result as $row) break;
-        $this->assertInternalType('array', $row);
+        $this->assertIsArray($row);
         $this->assertEquals(1, $row['id']);
     }
 
@@ -158,7 +158,7 @@
 
         $sql = "SELECT * FROM unit_tests WHERE id='1'";
         $result = $this->_conn->selectAll($sql);
-        $this->assertInternalType('array', $result);
+        $this->assertIsArray($result);
         $this->assertGreaterThan(0, count($result));
         $this->assertEquals(1, $result[0]['id']);
     }
@@ -585,6 +585,8 @@
 
     public function testAddIndex()
     {
+        $this->expectNotToPerformAssertions();
+
         $this->_createTestUsersTable();
 
         // Limit size of last_name and key columns to support Firebird index
@@ -734,6 +736,8 @@
 
     public function testIndexNameInvalid()
     {
+        $this->expectNotToPerformAssertions();
+
         try {
             $name = $this->_conn->indexName('sports');
         } catch (Horde_Db_Exception $e) {
@@ -795,6 +799,8 @@
 
     public function testAddColumnNotNullWithoutDefault()
     {
+        $this->expectNotToPerformAssertions();
+
         $table = $this->_conn->createTable('testings');
         $table->column('foo', 'string');
         $table->end();
@@ -810,6 +816,8 @@
 
     public function testAddColumnNotNullWithDefault()
     {
+        $this->expectNotToPerformAssertions();
+
         $table = $this->_conn->createTable('testings');
             $table->column('foo', 'string');
         $table->end();
@@ -907,12 +915,10 @@
         $this->assertEquals(2, $this->_conn->selectValue('SELECT foo FROM autoinc WHERE bar = 6'));
     }
 
-    /**
-     * @expectedException LogicException
-     * @expectedExceptionMessage foo has already been added as a primary key
-     */
     public function testAutoIncrementWithTypeInTableAndColumnDefined()
     {
+        $this->expectException('LogicException');
+        $this->expectExceptionMessage('foo has already been added as a primary key');
         $table = $this->_conn->createTable('autoincrement', array('autoincrementKey' => 'foo'));
         $table->column('foo', 'integer');
         $table->column('bar', 'integer');
@@ -1154,31 +1160,43 @@
 
     public function testTableConstruct()
     {
+        $this->expectNotToPerformAssertions();
+
         self::$_tableTest->testConstruct();
     }
 
     public function testTableName()
     {
+        $this->expectNotToPerformAssertions();
+
         self::$_tableTest->testName();
     }
 
     public function testTableGetOptions()
     {
+        $this->expectNotToPerformAssertions();
+
         self::$_tableTest->testGetOptions();
     }
 
     public function testTablePrimaryKey()
     {
+        $this->expectNotToPerformAssertions();
+
         self::$_tableTest->testPrimaryKey();
     }
 
     public function testTableColumn()
     {
+        $this->expectNotToPerformAssertions();
+
         self::$_tableTest->testColumn();
     }
 
     public function testTableToSql()
     {
+        $this->expectNotToPerformAssertions();
+
         self::$_tableTest->testToSql();
     }
 }
--- a/Horde_Db-2.4.1/test/Horde/Db/Migration/BaseTest.php
+++ b/Horde_Db-2.4.1/test/Horde/Db/Migration/BaseTest.php
@@ -26,9 +26,9 @@
  * @package    Db
  * @subpackage UnitTests
  */
-class Horde_Db_Migration_BaseTest extends PHPUnit_Framework_TestCase
+class Horde_Db_Migration_BaseTest extends Horde_Test_Case
 {
-    public function setUp()
+    public function setUp(): void
     {
         try {
             $this->_conn = new Horde_Db_Adapter_Pdo_Sqlite(array(
--- a/Horde_Db-2.4.1/test/Horde/Db/Migration/MigratorTest.php
+++ b/Horde_Db-2.4.1/test/Horde/Db/Migration/MigratorTest.php
@@ -24,7 +24,7 @@
  */
 class Horde_Db_Migration_MigratorTest extends Horde_Test_Case
 {
-    public function setUp()
+    public function setUp(): void
     {
         try {
             $this->_conn = new Horde_Db_Adapter_Pdo_Sqlite(array(
@@ -178,6 +178,8 @@
 
     public function testWithDuplicates()
     {
+        $this->expectNotToPerformAssertions();
+
         try {
             $dir = dirname(__DIR__).'/fixtures/migrations_with_duplicate/';
             $migrator = new Horde_Db_Migration_Migrator($this->_conn, null, array('migrationsPath' => $dir));
--- /dev/null
+++ b/Horde_Db-2.4.1/test/Horde/Db/phpunit.xml
@@ -0,0 +1 @@
+<phpunit bootstrap="bootstrap.php"></phpunit>
