aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/OCS
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AppFramework/OCS')
-rw-r--r--tests/lib/AppFramework/OCS/BaseResponseTest.php8
-rw-r--r--tests/lib/AppFramework/OCS/V2ResponseTest.php6
2 files changed, 6 insertions, 8 deletions
diff --git a/tests/lib/AppFramework/OCS/BaseResponseTest.php b/tests/lib/AppFramework/OCS/BaseResponseTest.php
index 159459a4aec..e04f7856623 100644
--- a/tests/lib/AppFramework/OCS/BaseResponseTest.php
+++ b/tests/lib/AppFramework/OCS/BaseResponseTest.php
@@ -12,9 +12,9 @@ namespace Test\AppFramework\OCS;
use OC\AppFramework\OCS\BaseResponse;
class ArrayValue implements \JsonSerializable {
- private $array;
- public function __construct(array $array) {
- $this->array = $array;
+ public function __construct(
+ private array $array,
+ ) {
}
public function jsonSerialize(): mixed {
@@ -50,7 +50,7 @@ class BaseResponseTest extends \Test\TestCase {
$writer->outputMemory(true)
);
}
-
+
public function testToXmlJsonSerializable(): void {
/** @var BaseResponse $response */
$response = $this->createMock(BaseResponse::class);
diff --git a/tests/lib/AppFramework/OCS/V2ResponseTest.php b/tests/lib/AppFramework/OCS/V2ResponseTest.php
index 97a227418f3..7a70ad6d633 100644
--- a/tests/lib/AppFramework/OCS/V2ResponseTest.php
+++ b/tests/lib/AppFramework/OCS/V2ResponseTest.php
@@ -15,15 +15,13 @@ use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
class V2ResponseTest extends \Test\TestCase {
- /**
- * @dataProvider providesStatusCodes
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('providesStatusCodes')]
public function testStatusCodeMapper(int $expected, int $sc): void {
$response = new V2Response(new DataResponse([], $sc));
$this->assertEquals($expected, $response->getStatus());
}
- public function providesStatusCodes(): array {
+ public static function providesStatusCodes(): array {
return [
[Http::STATUS_OK, 200],
[Http::STATUS_BAD_REQUEST, 104],