aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/DB
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/DB')
-rw-r--r--tests/lib/DB/ConnectionTest.php8
-rw-r--r--tests/lib/DB/DBSchemaTest.php4
-rw-r--r--tests/lib/DB/LegacyDBTest.php6
-rw-r--r--tests/lib/DB/MDB2SchemaManagerTest.php2
-rw-r--r--tests/lib/DB/MigrationsTest.php2
-rw-r--r--tests/lib/DB/MigratorTest.php4
-rw-r--r--tests/lib/DB/MySqlMigrationTest.php4
-rw-r--r--tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php2
-rw-r--r--tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php2
-rw-r--r--tests/lib/DB/QueryBuilder/FunctionBuilderTest.php2
-rw-r--r--tests/lib/DB/QueryBuilder/QueryBuilderTest.php2
-rw-r--r--tests/lib/DB/QueryBuilder/QuoteHelperTest.php2
-rw-r--r--tests/lib/DB/SchemaDiffTest.php4
-rw-r--r--tests/lib/DB/SqliteMigrationTest.php4
14 files changed, 24 insertions, 24 deletions
diff --git a/tests/lib/DB/ConnectionTest.php b/tests/lib/DB/ConnectionTest.php
index 02dd6a1495c..4683c53d339 100644
--- a/tests/lib/DB/ConnectionTest.php
+++ b/tests/lib/DB/ConnectionTest.php
@@ -26,12 +26,12 @@ class ConnectionTest extends \Test\TestCase {
*/
private $connection;
- public static function setUpBeforeClass() {
+ public static function setUpBeforeClass(): void {
self::dropTestTable();
parent::setUpBeforeClass();
}
- public static function tearDownAfterClass() {
+ public static function tearDownAfterClass(): void {
self::dropTestTable();
parent::tearDownAfterClass();
}
@@ -42,12 +42,12 @@ class ConnectionTest extends \Test\TestCase {
}
}
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
}
- public function tearDown() {
+ public function tearDown(): void {
parent::tearDown();
$this->connection->dropTable('table');
}
diff --git a/tests/lib/DB/DBSchemaTest.php b/tests/lib/DB/DBSchemaTest.php
index cc6059c163f..5fb68fdf258 100644
--- a/tests/lib/DB/DBSchemaTest.php
+++ b/tests/lib/DB/DBSchemaTest.php
@@ -27,7 +27,7 @@ class DBSchemaTest extends TestCase {
/** @var ITempManager */
protected $tempManager;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->tempManager = \OC::$server->getTempManager();
@@ -50,7 +50,7 @@ class DBSchemaTest extends TestCase {
$this->table2 = $r.'cntcts_cards';
}
- protected function tearDown() {
+ protected function tearDown(): void {
unlink($this->schema_file);
unlink($this->schema_file2);
diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php
index 578d28139bc..e0bb1055be1 100644
--- a/tests/lib/DB/LegacyDBTest.php
+++ b/tests/lib/DB/LegacyDBTest.php
@@ -21,7 +21,7 @@ class LegacyDBTest extends \Test\TestCase {
protected static $schema_file;
protected $test_prefix;
- public static function setUpBeforeClass() {
+ public static function setUpBeforeClass(): void {
self::$schema_file = \OC::$server->getTempManager()->getTemporaryFile();
}
@@ -56,7 +56,7 @@ class LegacyDBTest extends \Test\TestCase {
*/
private $text_table;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$dbFile = \OC::$SERVERROOT.'/tests/data/db_structure.xml';
@@ -76,7 +76,7 @@ class LegacyDBTest extends \Test\TestCase {
$this->text_table = $this->test_prefix.'text_table';
}
- protected function tearDown() {
+ protected function tearDown(): void {
OC_DB::removeDBStructure(self::$schema_file);
unlink(self::$schema_file);
diff --git a/tests/lib/DB/MDB2SchemaManagerTest.php b/tests/lib/DB/MDB2SchemaManagerTest.php
index 75572bb36a5..8c9290c56b4 100644
--- a/tests/lib/DB/MDB2SchemaManagerTest.php
+++ b/tests/lib/DB/MDB2SchemaManagerTest.php
@@ -20,7 +20,7 @@ use Doctrine\DBAL\Platforms\OraclePlatform;
*/
class MDB2SchemaManagerTest extends \Test\TestCase {
- protected function tearDown() {
+ protected function tearDown(): void {
// do not drop the table for Oracle as it will create a bogus transaction
// that will break the following test suites requiring transactions
if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') !== 'oci') {
diff --git a/tests/lib/DB/MigrationsTest.php b/tests/lib/DB/MigrationsTest.php
index 87547debe80..8f38b3addd0 100644
--- a/tests/lib/DB/MigrationsTest.php
+++ b/tests/lib/DB/MigrationsTest.php
@@ -36,7 +36,7 @@ class MigrationsTest extends \Test\TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject | IDBConnection $db */
private $db;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->db = $this->createMock(Connection::class);
diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php
index e9c52015dbe..ca778fd4e2f 100644
--- a/tests/lib/DB/MigratorTest.php
+++ b/tests/lib/DB/MigratorTest.php
@@ -44,7 +44,7 @@ class MigratorTest extends \Test\TestCase {
/** @var string */
private $tableNameTmp;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->config = \OC::$server->getConfig();
@@ -61,7 +61,7 @@ class MigratorTest extends \Test\TestCase {
return strtolower($this->getUniqueID($this->config->getSystemValue('dbtableprefix', 'oc_') . 'test_'));
}
- protected function tearDown() {
+ protected function tearDown(): void {
// Try to delete if exists (IF EXISTS NOT SUPPORTED IN ORACLE)
try {
$this->connection->exec('DROP TABLE ' . $this->connection->quoteIdentifier($this->tableNameTmp));
diff --git a/tests/lib/DB/MySqlMigrationTest.php b/tests/lib/DB/MySqlMigrationTest.php
index 3bbe89fe025..5ebbd273c33 100644
--- a/tests/lib/DB/MySqlMigrationTest.php
+++ b/tests/lib/DB/MySqlMigrationTest.php
@@ -21,7 +21,7 @@ class MySqlMigrationTest extends \Test\TestCase {
/** @var string */
private $tableName;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
@@ -34,7 +34,7 @@ class MySqlMigrationTest extends \Test\TestCase {
$this->connection->exec("CREATE TABLE $this->tableName(b BIT, e ENUM('1','2','3','4'))");
}
- protected function tearDown() {
+ protected function tearDown(): void {
$this->connection->getSchemaManager()->dropTable($this->tableName);
parent::tearDown();
}
diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
index c71e83f5fd6..8e0ce2fe934 100644
--- a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
+++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
@@ -31,7 +31,7 @@ class ExpressionBuilderDBTest extends TestCase {
/** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */
protected $connection;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php
index f5dc2a07246..b3e9124e7de 100644
--- a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php
@@ -43,7 +43,7 @@ class ExpressionBuilderTest extends TestCase {
/** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */
protected $connection;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
diff --git a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php
index a8af7f4fe07..d7617125faa 100644
--- a/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/FunctionBuilderTest.php
@@ -35,7 +35,7 @@ class FunctionBuilderTest extends TestCase {
/** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */
protected $connection;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
diff --git a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php
index fa1c4add0ab..e9878d33d85 100644
--- a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php
@@ -49,7 +49,7 @@ class QueryBuilderTest extends \Test\TestCase {
/** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
protected $logger;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
diff --git a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php
index 3c1abd72f66..3b5562b69c9 100644
--- a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php
+++ b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php
@@ -31,7 +31,7 @@ class QuoteHelperTest extends \Test\TestCase {
/** @var QuoteHelper */
protected $helper;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->helper = new QuoteHelper();
diff --git a/tests/lib/DB/SchemaDiffTest.php b/tests/lib/DB/SchemaDiffTest.php
index f74d800bfec..78963698571 100644
--- a/tests/lib/DB/SchemaDiffTest.php
+++ b/tests/lib/DB/SchemaDiffTest.php
@@ -50,7 +50,7 @@ class SchemaDiffTest extends TestCase {
private $schemaFile;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->schemaFile = \OC::$server->getTempManager()->getTemporaryFile();
@@ -61,7 +61,7 @@ class SchemaDiffTest extends TestCase {
$this->testPrefix= strtolower($this->getUniqueID($this->config->getSystemValue('dbtableprefix', 'oc_'), 3));
}
- protected function tearDown() {
+ protected function tearDown(): void {
$this->manager->removeDBStructure($this->schemaFile);
parent::tearDown();
}
diff --git a/tests/lib/DB/SqliteMigrationTest.php b/tests/lib/DB/SqliteMigrationTest.php
index 4712fc6d70b..ecc6cbe0951 100644
--- a/tests/lib/DB/SqliteMigrationTest.php
+++ b/tests/lib/DB/SqliteMigrationTest.php
@@ -21,7 +21,7 @@ class SqliteMigrationTest extends \Test\TestCase {
/** @var string */
private $tableName;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
@@ -34,7 +34,7 @@ class SqliteMigrationTest extends \Test\TestCase {
$this->connection->exec("CREATE TABLE $this->tableName(t0 tinyint unsigned, t1 tinyint)");
}
- protected function tearDown() {
+ protected function tearDown(): void {
$this->connection->getSchemaManager()->dropTable($this->tableName);
parent::tearDown();
}