From f811a6d4c78e864d5ef8bea1a95bd91822c27d2d Mon Sep 17 00:00:00 2001
From: smiley <codemasher@users.noreply.github.com>
Date: Mon, 23 Oct 2023 18:51:13 +0200
Subject: [PATCH] fixed some oversights from #48

---
 test/RequestFactoryTest.php       | 6 +++---
 test/ResponseFactoryTest.php      | 2 +-
 test/ResponseFactoryTestCase.php  | 8 ++++----
 test/ServerRequestFactoryTest.php | 6 +++---
 test/StreamFactoryTest.php        | 2 +-
 test/UploadedFileFactoryTest.php  | 6 +++---
 test/UriFactoryTest.php           | 2 +-
 7 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/test/RequestFactoryTest.php b/test/RequestFactoryTest.php
index 2731d4f..89499b2 100644
--- a/test/RequestFactoryTest.php
+++ b/test/RequestFactoryTest.php
@@ -16,7 +16,7 @@ final class RequestFactoryTest extends RequestFactoryTestCase
     protected function createRequestFactory()
     {
         if (!defined('REQUEST_FACTORY') || !class_exists(REQUEST_FACTORY)) {
-            self::markTestSkipped('Request factory class name not provided');
+            self::markTestSkipped('REQUEST_FACTORY class name not provided');
         }
 
         return new (REQUEST_FACTORY);
@@ -27,8 +27,8 @@ final class RequestFactoryTest extends RequestFactoryTestCase
      */
     protected function createUri($uri)
     {
-        if (!defined('URI_FACTORY')) {
-            self::markTestSkipped('URI factory class name not provided');
+        if (!defined('URI_FACTORY') || !class_exists(URI_FACTORY)) {
+            self::markTestSkipped('URI_FACTORY class name not provided');
         }
 
         return (new (URI_FACTORY))->createUri($uri);
diff --git a/test/ResponseFactoryTest.php b/test/ResponseFactoryTest.php
index 9895871..c231fa1 100644
--- a/test/ResponseFactoryTest.php
+++ b/test/ResponseFactoryTest.php
@@ -16,7 +16,7 @@ final class ResponseFactoryTest extends ResponseFactoryTestCase
     protected function createResponseFactory()
     {
         if (!defined('RESPONSE_FACTORY') || !class_exists(RESPONSE_FACTORY)) {
-            self::markTestSkipped('Response factory class name not provided');
+            self::markTestSkipped('RESPONSE_FACTORY class name not provided');
         }
 
         return new (RESPONSE_FACTORY);
diff --git a/test/ResponseFactoryTestCase.php b/test/ResponseFactoryTestCase.php
index c61c58c..ca654e4 100644
--- a/test/ResponseFactoryTestCase.php
+++ b/test/ResponseFactoryTestCase.php
@@ -33,10 +33,10 @@ abstract class ResponseFactoryTestCase extends TestCase
     public static function dataCodes()
     {
         return [
-            '200' => [200],
-            '301' => [301],
-            '404' => [404],
-            '500' => [500],
+            'HTTP/200' => [200],
+            'HTTP/301' => [301],
+            'HTTP/404' => [404],
+            'HTTP/500' => [500],
         ];
     }
 
diff --git a/test/ServerRequestFactoryTest.php b/test/ServerRequestFactoryTest.php
index 928acd5..9133a5f 100644
--- a/test/ServerRequestFactoryTest.php
+++ b/test/ServerRequestFactoryTest.php
@@ -16,7 +16,7 @@ final class ServerRequestFactoryTest extends ServerRequestFactoryTestCase
     protected function createServerRequestFactory()
     {
         if (!defined('SERVER_REQUEST_FACTORY') || !class_exists(SERVER_REQUEST_FACTORY)) {
-            self::markTestSkipped('Server Request factory class name not provided');
+            self::markTestSkipped('SERVER_REQUEST_FACTORY class name not provided');
         }
 
         return new (SERVER_REQUEST_FACTORY);
@@ -27,8 +27,8 @@ final class ServerRequestFactoryTest extends ServerRequestFactoryTestCase
      */
     protected function createUri($uri)
     {
-        if (!defined('URI_FACTORY')) {
-            self::markTestSkipped('URI factory class name not provided');
+        if (!defined('URI_FACTORY') || !class_exists(URI_FACTORY)) {
+            self::markTestSkipped('URI_FACTORY class name not provided');
         }
 
         return (new (URI_FACTORY))->createUri($uri);
diff --git a/test/StreamFactoryTest.php b/test/StreamFactoryTest.php
index b6cd4ce..3bc2697 100644
--- a/test/StreamFactoryTest.php
+++ b/test/StreamFactoryTest.php
@@ -16,7 +16,7 @@ final class StreamFactoryTest extends StreamFactoryTestCase
     protected function createStreamFactory()
     {
         if (!defined('STREAM_FACTORY') || !class_exists(STREAM_FACTORY)) {
-            self::markTestSkipped('Stream factory class name not provided');
+            self::markTestSkipped('STREAM_FACTORY class name not provided');
         }
 
         return new (STREAM_FACTORY);
diff --git a/test/UploadedFileFactoryTest.php b/test/UploadedFileFactoryTest.php
index f72d93e..1b11ea4 100644
--- a/test/UploadedFileFactoryTest.php
+++ b/test/UploadedFileFactoryTest.php
@@ -16,7 +16,7 @@ final class UploadedFileFactoryTest extends UploadedFileFactoryTestCase
     protected function createUploadedFileFactory()
     {
         if (!defined('UPLOADED_FILE_FACTORY') || !class_exists(UPLOADED_FILE_FACTORY)) {
-            self::markTestSkipped('Uploaded File factory class name not provided');
+            self::markTestSkipped('UPLOADED_FILE_FACTORY class name not provided');
         }
 
         return new (UPLOADED_FILE_FACTORY);
@@ -24,8 +24,8 @@ final class UploadedFileFactoryTest extends UploadedFileFactoryTestCase
 
     protected function createStream($content)
     {
-        if (!defined('STREAM_FACTORY')) {
-            self::markTestSkipped('STREAM factory class name not provided');
+        if (!defined('STREAM_FACTORY') || !class_exists(STREAM_FACTORY)) {
+            self::markTestSkipped('STREAM_FACTORY class name not provided');
         }
 
         return (new (STREAM_FACTORY))->createStream($content);
diff --git a/test/UriFactoryTest.php b/test/UriFactoryTest.php
index 3ef7c94..7bb5d78 100644
--- a/test/UriFactoryTest.php
+++ b/test/UriFactoryTest.php
@@ -16,7 +16,7 @@ final class UriFactoryTest extends UriFactoryTestCase
     protected function createUriFactory()
     {
         if (!defined('URI_FACTORY') || !class_exists(URI_FACTORY)) {
-            self::markTestSkipped('URI factory class name not provided');
+            self::markTestSkipped('URI_FACTORY class name not provided');
         }
 
         return new (URI_FACTORY);
-- 
GitLab