From 468ccb5693e326116ca05ccc5b6b232222c4a5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20B=C3=A9rub=C3=A9?= Date: Sun, 25 Nov 2018 18:18:33 -0700 Subject: [PATCH] rename test cases for decorators --- .../ResponseDecoratorTest.php => ResponseTest.php} | 13 ++++++------- ...questDecoratorTest.php => ServerRequestTest.php} | 9 ++++----- .../UriDecoratorTest.php => UriTest.php} | 9 ++++----- 3 files changed, 14 insertions(+), 17 deletions(-) rename tests/{Decorators/ResponseDecoratorTest.php => ResponseTest.php} (97%) rename tests/{Decorators/ServerRequestDecoratorTest.php => ServerRequestTest.php} (99%) rename tests/{Decorators/UriDecoratorTest.php => UriTest.php} (99%) diff --git a/tests/Decorators/ResponseDecoratorTest.php b/tests/ResponseTest.php similarity index 97% rename from tests/Decorators/ResponseDecoratorTest.php rename to tests/ResponseTest.php index 81d129d..efb20b5 100644 --- a/tests/Decorators/ResponseDecoratorTest.php +++ b/tests/ResponseTest.php @@ -6,14 +6,13 @@ * @copyright Copyright (c) 2011-2018 Josh Lockhart * @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE (MIT License) */ -namespace Slim\Tests\Http\Decorators; +namespace Slim\Tests\Http; -use Slim\Http\Decorators\ResponseDecorator; +use Slim\Http\Response; use Slim\Http\Factory\DecoratedResponseFactory; use Slim\Tests\Http\Providers\Psr17FactoryProvider; -use Slim\Tests\Http\Test; -class ResponseDecoratorTest extends Test +class ResponseTest extends TestCase { public function testDisableSetter() { @@ -354,8 +353,8 @@ public function testIsServerError() public function testToString() { - $output = 'HTTP/1.1 404 Not Found' . ResponseDecorator::EOL . - 'X-Foo: Bar' . ResponseDecorator::EOL . ResponseDecorator::EOL . + $output = 'HTTP/1.1 404 Not Found' . Response::EOL . + 'X-Foo: Bar' . Response::EOL . Response::EOL . 'Where am I?'; $expectedOutputString = ''; @@ -391,7 +390,7 @@ public function testWithJson() $provider->getStreamFactory() ); - /** @var ResponseDecorator $originalResponse */ + /** @var Response $originalResponse */ $originalResponse = $decoratedResponseFactory->createResponse(503); $response = $originalResponse->withJson($data, 201); diff --git a/tests/Decorators/ServerRequestDecoratorTest.php b/tests/ServerRequestTest.php similarity index 99% rename from tests/Decorators/ServerRequestDecoratorTest.php rename to tests/ServerRequestTest.php index 6b2de83..3e7a5a2 100644 --- a/tests/Decorators/ServerRequestDecoratorTest.php +++ b/tests/ServerRequestTest.php @@ -6,17 +6,16 @@ * @copyright Copyright (c) 2011-2018 Josh Lockhart * @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE (MIT License) */ -namespace Slim\Tests\Http\Decorators; +namespace Slim\Tests\Http; use Slim\Http\Factory\DecoratedServerRequestFactory; use Slim\Tests\Http\Providers\Psr17FactoryProvider; -use Slim\Tests\Http\Test; /** - * Class ServerRequestDecoratorTest - * @package Slim\Tests\Http\Decorators + * Class ServerRequestTest + * @package Slim\Tests\Http */ -class ServerRequestDecoratorTest extends Test +class ServerRequestTest extends TestCase { public function testDisableSetter() { diff --git a/tests/Decorators/UriDecoratorTest.php b/tests/UriTest.php similarity index 99% rename from tests/Decorators/UriDecoratorTest.php rename to tests/UriTest.php index 00fb59e..d9d4cb5 100644 --- a/tests/Decorators/UriDecoratorTest.php +++ b/tests/UriTest.php @@ -6,17 +6,16 @@ * @copyright Copyright (c) 2011-2018 Josh Lockhart * @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE (MIT License) */ -namespace Slim\Tests\Http\Decorators; +namespace Slim\Tests\Http; use Slim\Http\Factory\DecoratedUriFactory; use Slim\Tests\Http\Providers\Psr17FactoryProvider; -use Slim\Tests\Http\Test; /** - * Class UriDecoratorTest - * @package Slim\Tests\Http\Decorators + * Class UriTest + * @package Slim\Tests\Http */ -class UriDecoratorTest extends Test +class UriTest extends TestCase { public function testDisableSetter() {