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

Fix request creator factory test #3017

Merged
merged 3 commits into from
Nov 10, 2020

Conversation

pawel-slowik
Copy link
Contributor

Related to #2966 .

Before:

./vendor/bin/phpunit --filter 'Slim\\Tests\\Factory\\ServerRequestCreatorFactoryTest::testSetServerRequestCreator'

There was 1 failure:

1) Slim\Tests\Factory\ServerRequestCreatorFactoryTest::testSetServerRequestCreator
Failed asserting that two variables reference the same object.

/home/test/Slim/tests/Factory/ServerRequestCreatorFactoryTest.php:107

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

After:

./vendor/bin/phpunit --filter 'Slim\\Tests\\Factory\\ServerRequestCreatorFactoryTest::testSetServerRequestCreatorWithDecorators'

OK (1 test, 2 assertions)

./vendor/bin/phpunit --filter 'Slim\\Tests\\Factory\\ServerRequestCreatorFactoryTest::testSetServerRequestCreatorWithoutDecorators'

OK (1 test, 2 assertions)

The test assumes that createServerRequestFromGlobals must always return
a request object created by the previously set creator. But this is only
true if automatic request object decoration is disabled.
@pawel-slowik
Copy link
Contributor Author

The Travis failure is a Composer 2.0 issue, not sure how to fix that.

@l0gicgate
Copy link
Member

@pawel-slowik we need to fix the build issue before we can move forward with any PRs.. I'm looking into it.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 2dd2293 on pawel-slowik:fix-request-creator-factory-test into a65c364 on slimphp:4.x.

@l0gicgate l0gicgate added this to the 4.6.0 milestone Nov 10, 2020
@l0gicgate l0gicgate merged commit 2974dc3 into slimphp:4.x Nov 10, 2020
@l0gicgate l0gicgate mentioned this pull request Nov 15, 2020
@pawel-slowik pawel-slowik deleted the fix-request-creator-factory-test branch December 1, 2020 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants