From e5563184b4c9eab81ecb58c6ef530516559e8488 Mon Sep 17 00:00:00 2001 From: Oscar Otero Date: Fri, 4 Dec 2020 01:14:39 +0100 Subject: [PATCH] removed failing test --- CHANGELOG.md | 2 +- composer.json | 3 +-- tests/RequestHandlerTest.php | 24 ------------------------ 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b2a2ff..19c183a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [2.0.1] - 2020-12-03 +## [2.0.1] - 2020-12-04 ### Added - Support for PHP 8.0 diff --git a/composer.json b/composer.json index 8c0f260..fe3e2ee 100644 --- a/composer.json +++ b/composer.json @@ -30,8 +30,7 @@ "oscarotero/php-cs-fixer-config": "^1.0", "squizlabs/php_codesniffer": "^3.0", "phpstan/phpstan": "^0.12", - "laminas/laminas-diactoros": "^2.3", - "phpspec/prophecy-phpunit": "^2.0" + "laminas/laminas-diactoros": "^2.3" }, "suggest": { "psr/container": "Can be used to resolve handlers automatically" diff --git a/tests/RequestHandlerTest.php b/tests/RequestHandlerTest.php index 97daf20..2d2c08b 100644 --- a/tests/RequestHandlerTest.php +++ b/tests/RequestHandlerTest.php @@ -10,9 +10,6 @@ use Middlewares\Utils\Factory; use Middlewares\Utils\RequestHandler as UtilsRequestHandler; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; -use Prophecy\Argument; -use Prophecy\Prophecy\ObjectProphecy; use Psr\Container\ContainerInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; @@ -20,8 +17,6 @@ class RequestHandlerTest extends TestCase { - use ProphecyTrait; - /** * phpunit 8 support */ @@ -76,25 +71,6 @@ public function testInvalidHandler() ); } - public function testCustomContainer() - { - /** @var ContainerInterface|ObjectProphecy $container */ - $container = $this->prophesize(ContainerInterface::class); - $container->get('IndexController', Argument::cetera()) - ->willReturn(new UtilsRequestHandler(function ($request) { - return Factory::createResponse(); - })); - - $response = Dispatcher::run( - [ - new RequestHandler($container->reveal()), - ], - Factory::createServerRequest('GET', '/')->withAttribute('request-handler', 'IndexController') - ); - - self::assertSame(200, $response->getStatusCode()); - } - public function testArrayHandler() { $request = Factory::createServerRequest('GET', '/');