Skip to content

Commit

Permalink
removed failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Dec 4, 2020
1 parent 03a08e6 commit e556318
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 0 additions & 24 deletions tests/RequestHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@
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;
use RuntimeException;

class RequestHandlerTest extends TestCase
{
use ProphecyTrait;

/**
* phpunit 8 support
*/
Expand Down Expand Up @@ -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', '/');
Expand Down

0 comments on commit e556318

Please sign in to comment.