aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/DB/QueryBuilder/QuoteHelperTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/DB/QueryBuilder/QuoteHelperTest.php')
-rw-r--r--tests/lib/DB/QueryBuilder/QuoteHelperTest.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php
index 12984bac3e0..6efb55708a1 100644
--- a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php
+++ b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -23,7 +24,7 @@ class QuoteHelperTest extends \Test\TestCase {
$this->helper = new QuoteHelper();
}
- public function dataQuoteColumnName() {
+ public static function dataQuoteColumnName(): array {
return [
['column', '`column`'],
[new Literal('literal'), 'literal'],
@@ -37,18 +38,18 @@ class QuoteHelperTest extends \Test\TestCase {
}
/**
- * @dataProvider dataQuoteColumnName
* @param mixed $input
* @param string $expected
*/
- public function testQuoteColumnName($input, $expected) {
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataQuoteColumnName')]
+ public function testQuoteColumnName($input, $expected): void {
$this->assertSame(
$expected,
$this->helper->quoteColumnName($input)
);
}
- public function dataQuoteColumnNames() {
+ public static function dataQuoteColumnNames(): array {
return [
// Single case
['d.column', '`d`.`column`'],
@@ -72,11 +73,11 @@ class QuoteHelperTest extends \Test\TestCase {
}
/**
- * @dataProvider dataQuoteColumnNames
* @param mixed $input
* @param string $expected
*/
- public function testQuoteColumnNames($input, $expected) {
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataQuoteColumnNames')]
+ public function testQuoteColumnNames($input, $expected): void {
$this->assertSame(
$expected,
$this->helper->quoteColumnNames($input)