php-http/psr7-integration-tests
Integration test suite to verify PSR-7 HTTP message implementations against the specification. Run the tests in your own PSR-7 package to ensure Request/Response/Stream/URI behavior matches the standard and stays compatible across libraries.
Adds UriIntegrationTest::testSpecialCharsInUserInfo and UriIntegrationTest::testAlreadyEncodedUserInfo.
These validate that usernames and passwords which contain reserved characters (defined by RFC3986) are being encoded
so that the URI does not contain these reserved characters at any time.
Adds support for testing against PSR-7 1.1 and 2.0. In particular, it adapts tests that were verifying invalid parameters threw InvalidArgumentException previously now either throw that OR (more correctly) raise a TypeError.
UriIntegrationTest::testGetPathNormalizesMultipleLeadingSlashesToSingleSlashToPreventXSS(), UriIntegrationTest::testStringRepresentationWithMultipleSlashes(array $test), and RequestIntegrationTest::testGetRequestTargetInOriginFormNormalizesUriWithMultipleLeadingSlashesInPath().
These validate that a path containing multiple leading slashes is (a) represented with a single slash when calling UriInterface::getPath(), and (b) represented without changes when calling UriInterface::__toString(), including when calling RequestInterface::getRequestTarget() (which returns the path without the URI authority by default, to comply with origin-form).
This is done to validate mitigations for CVE-2015-3257.UriIntegrationTest::testPathWithMultipleSlashes() to only validate multiple slashes in the middle of a path.
Multiple leading slashes are covered with the newly introduced tests.Replace deprecated assertRegExp() with assertMatchesRegularExpression()
Support for PHP8 and PHPUnit 8 and 9
Compatible with PHP5
How can I help you explore Laravel packages today?