2020-12-14 15:56:07 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2024-05-10 15:09:14 +02:00
|
|
|
/**
|
|
|
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2020-12-14 15:56:07 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Tests\Http\WellKnown;
|
|
|
|
|
|
|
|
use OCP\AppFramework\Http\JSONResponse;
|
|
|
|
use OCP\Http\WellKnown\GenericResponse;
|
|
|
|
use Test\TestCase;
|
|
|
|
|
|
|
|
class GenericResponseTest extends TestCase {
|
|
|
|
public function testToHttpResponse(): void {
|
|
|
|
$httpResponse = $this->createMock(JSONResponse::class);
|
|
|
|
|
|
|
|
$response = new GenericResponse($httpResponse);
|
|
|
|
|
|
|
|
self::assertSame($httpResponse, $response->toHttpResponse());
|
|
|
|
}
|
|
|
|
}
|