GenericResponseTest.php 565 B

123456789101112131415161718192021222324
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace Tests\Http\WellKnown;
  8. use OCP\AppFramework\Http\JSONResponse;
  9. use OCP\Http\WellKnown\GenericResponse;
  10. use Test\TestCase;
  11. class GenericResponseTest extends TestCase {
  12. public function testToHttpResponse(): void {
  13. $httpResponse = $this->createMock(JSONResponse::class);
  14. $response = new GenericResponse($httpResponse);
  15. self::assertSame($httpResponse, $response->toHttpResponse());
  16. }
  17. }