summaryrefslogtreecommitdiff
path: root/tests/PHPUnit/TestCases/HttpResponseTestCase.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/PHPUnit/TestCases/HttpResponseTestCase.php
parent6dc0447320272aaae51a98eb6606597019f986d3 (diff)
create .cache directory and move tests to Integration directory
Diffstat (limited to 'tests/PHPUnit/TestCases/HttpResponseTestCase.php')
-rw-r--r--tests/PHPUnit/TestCases/HttpResponseTestCase.php37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/PHPUnit/TestCases/HttpResponseTestCase.php b/tests/PHPUnit/TestCases/HttpResponseTestCase.php
deleted file mode 100644
index 31dc1d7..0000000
--- a/tests/PHPUnit/TestCases/HttpResponseTestCase.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-namespace Tests\PHPUnit\TestCases;
-
-use GuzzleHttp\Client;
-use GuzzleHttp\Psr7\Response;
-use PHPUnit\Framework\TestCase;
-
-class HttpResponseTestCase extends TestCase
-{
- protected Client $client;
-
- protected function setUp(): void
- {
- $this->client = new Client([
- "base_uri" => "http://localhost:8080",
- ]);
- }
-
- /**
- * @param array $options
- */
- public function request(string $method, string $path, array $options = []): Response
- {
- return $this->client->request(
- $method,
- $path,
- ["http_errors" => false] + $options
- );
- }
-
- public function hasJsonBody(Response $response): bool
- {
- json_decode((string)$response->getBody());
- return json_last_error() === JSON_ERROR_NONE;
- }
-}