aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Db
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AppFramework/Db')
-rw-r--r--tests/lib/AppFramework/Db/EntityTest.php4
-rw-r--r--tests/lib/AppFramework/Db/QBMapperDBTest.php2
-rw-r--r--tests/lib/AppFramework/Db/TransactionalTest.php14
3 files changed, 8 insertions, 12 deletions
diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php
index 4fcf126e3b1..eab081e6ac6 100644
--- a/tests/lib/AppFramework/Db/EntityTest.php
+++ b/tests/lib/AppFramework/Db/EntityTest.php
@@ -225,9 +225,7 @@ class EntityTest extends \Test\TestCase {
}
- /**
- * @dataProvider dataSetterCasts
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataSetterCasts')]
public function testSetterCasts(string $field, mixed $in, mixed $out): void {
$entity = new TestEntity();
$entity->{'set' . $field}($in);
diff --git a/tests/lib/AppFramework/Db/QBMapperDBTest.php b/tests/lib/AppFramework/Db/QBMapperDBTest.php
index 8ad8c43bed8..614f1099644 100644
--- a/tests/lib/AppFramework/Db/QBMapperDBTest.php
+++ b/tests/lib/AppFramework/Db/QBMapperDBTest.php
@@ -64,7 +64,7 @@ class QBDBTestMapper extends QBMapper {
* @group DB
*/
class QBMapperDBTest extends TestCase {
- /** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */
+ /** @var \Doctrine\DBAL\Connection|IDBConnection */
protected $connection;
protected $schemaSetup = false;
diff --git a/tests/lib/AppFramework/Db/TransactionalTest.php b/tests/lib/AppFramework/Db/TransactionalTest.php
index bf8abcd7aa2..72a3d9ae59f 100644
--- a/tests/lib/AppFramework/Db/TransactionalTest.php
+++ b/tests/lib/AppFramework/Db/TransactionalTest.php
@@ -28,10 +28,9 @@ class TransactionalTest extends TestCase {
$test = new class($this->db) {
use TTransactional;
- private IDBConnection $db;
-
- public function __construct(IDBConnection $db) {
- $this->db = $db;
+ public function __construct(
+ private IDBConnection $db,
+ ) {
}
public function fail(): void {
@@ -55,10 +54,9 @@ class TransactionalTest extends TestCase {
$test = new class($this->db) {
use TTransactional;
- private IDBConnection $db;
-
- public function __construct(IDBConnection $db) {
- $this->db = $db;
+ public function __construct(
+ private IDBConnection $db,
+ ) {
}
public function succeed(): int {