diff --git a/test/RequestFactoryTest.php b/test/RequestFactoryTest.php index 2731d4f8ea68e66fbece61b240c071db7a8f69fc..89499b2f20f490db8006a30a41502054c0040ca1 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 98958711b1d404fb826a372296ede02a450a32f3..c231fa152c180c3ede6b88a86089578f29b4c985 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 c61c58c397e0891f20ab294aa3ac5fbd5068ed73..ca654e43b0ff9bb9e29a2dd2ce55c96f1f675a15 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 928acd5448092532e93051475f650759826b6121..9133a5fbd60fd8489585c1911c8d5fd3be5d781e 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 b6cd4ce53d6f5884eb274fa2dd2ae89bf9ea470c..3bc26977195b185a2fd3a38d37758c6d226dd351 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 f72d93e5211a498ea7f2750896cc803aa4808f53..1b11ea438df054917c0a92938b73d97fe016f36c 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 3ef7c94374378c99810e69691d244fd30e367d38..7bb5d785f9c89b94d45565cd7fbc8aad41662fa7 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);