Nyholm / psr7

A super lightweight PSR-7 implementation
MIT License
1.15k stars 75 forks source link

Integration tests errors #210

Closed vanodevium closed 1 year ago

vanodevium commented 1 year ago
There were 2 failures:

1) Tests\Nyholm\Psr7\Integration\RequestTest::testGetRequestTargetInOriginFormNormalizesUriWithMultipleLeadingSlashesInPath
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'/valid///path'
+'//valid///path'

/home/devium/nyholm-psr7/vendor/php-http/psr7-integration-tests/src/RequestIntegrationTest.php:191

2) Tests\Nyholm\Psr7\Integration\UriTest::testGetPathNormalizesMultipleLeadingSlashesToSingleSlashToPreventXSS
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'/valid///path'
+'//valid///path'

/home/devium/nyholm-psr7/vendor/php-http/psr7-integration-tests/src/UriIntegrationTest.php:262

FAILURES!
Tests: 397, Assertions: 905, Failures: 2, Skipped: 1.
vanodevium commented 1 year ago

How to reproduce:

  1. clone this repo
  2. composer install
  3. ./vendor/bin/phpunit

❯ php -v PHP 8.2.1 (cli) (built: Jan 13 2023 10:42:21) (NTS) Copyright (c) The PHP Group Zend Engine v4.2.1, Copyright (c) Zend Technologies with Zend OPcache v8.2.1, Copyright (c), by Zend Technologies

nicolas-grekas commented 1 year ago

Fixed