summaryrefslogtreecommitdiff
path: root/tests/ServerImplementationTest.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-08-26 11:30:49 +0200
committerDaniel Weipert <git@mail.dweipert.de>2025-08-26 11:30:49 +0200
commitdb014ebf9f8f84a1a0d0972298e70bf29e57c37e (patch)
treefbb4ee22f913b048e3c58720ddd77be8c5805efb /tests/ServerImplementationTest.php
parent6dc0447320272aaae51a98eb6606597019f986d3 (diff)
create .cache directory and move tests to Integration directory
Diffstat (limited to 'tests/ServerImplementationTest.php')
-rw-r--r--tests/ServerImplementationTest.php36
1 files changed, 0 insertions, 36 deletions
diff --git a/tests/ServerImplementationTest.php b/tests/ServerImplementationTest.php
deleted file mode 100644
index a48a8b8..0000000
--- a/tests/ServerImplementationTest.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-namespace Tests;
-
-use Symfony\Component\HttpFoundation\Response;
-use Tests\PHPUnit\TestCases\HttpResponseTestCase;
-
-class ServerImplementationTest extends HttpResponseTestCase
-{
- public function testVersion(): void
- {
- $response = $this->request("GET", "/_matrix/federation/v1/version");
-
- $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
- $this->assertTrue($this->hasJsonBody($response));
-
- $body = json_decode((string)$response->getBody(), true);
-
- $this->assertArrayHasKey("server", $body);
- $this->assertArrayHasKey("name", $body["server"]);
- $this->assertArrayHasKey("version", $body["server"]);
- }
-
- public function testVersions(): void
- {
- $response = $this->request("GET", "/_matrix/client/versions");
-
- $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
- $this->assertTrue($this->hasJsonBody($response));
-
- $body = json_decode((string)$response->getBody(), true);
-
- $this->assertIsArray($body["versions"]);
- $this->assertTrue(count($body["versions"]) > 0);
- }
-}