Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x - Add test case for MethodOverrideMiddleware::process() for eof body stream #2695

merged 2 commits into from May 18, 2019


None yet
3 participants
Copy link

commented May 17, 2019

This PR adds a test case that prophesizes a body stream in order to be able to test whether or not the following lines of code would actually be called.

if ($request->getBody()->eof()) {

Not sure, if the test case is as desired. It is more or less a duplicate of the \Slim\Tests\Middleware\MethodOverrideMiddlewareTest::testNoOverride() test case. So instead of calling the \Slim\Middleware\MethodOverrideMiddleware::process() method directly, the test case uses a middleware dispatcher.

Additionally some type hints had been added to various closures in the class.


This comment has been minimized.

Copy link

commented May 17, 2019

Coverage Status

Coverage increased (+0.1%) to 99.745% when pulling 49922e8 on adriansuter:test-methodOverrideMiddleware into 5cc55c6 on slimphp:4.x.

@l0gicgate l0gicgate added this to the 4.0.0-beta milestone May 18, 2019

@l0gicgate l0gicgate added the Slim 4 label May 18, 2019

@l0gicgate l0gicgate merged commit 73118af into slimphp:4.x May 18, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.1%) to 99.745%

@l0gicgate l0gicgate referenced this pull request May 19, 2019


Slim 4 Beta Release #2696

@adriansuter adriansuter deleted the adriansuter:test-methodOverrideMiddleware branch May 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.