Skip to content

Commit

Permalink
Use valid Etags in tests
Browse files Browse the repository at this point in the history
must have quotes
  • Loading branch information
fatso83 committed Jan 12, 2022
1 parent 6b9fafb commit ff1e2c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
Expand Up @@ -181,11 +181,11 @@ public function testIsNotModifiedLastModified()

public function testIsNotModifiedEtag()
{
$etagOne = 'randomly_generated_etag';
$etagTwo = 'randomly_generated_etag_2';
$etagOne = '"randomly_generated_etag"';
$etagTwo = '"randomly_generated_etag_2"';

$request = new Request();
$request->headers->set('If-None-Match', sprintf('%s, %s, %s', $etagOne, $etagTwo, 'etagThree'));
$request->headers->set('If-None-Match', sprintf('%s, %s, %s', $etagOne, $etagTwo, '"etagThree"'));

$response = new Response();

Expand All @@ -208,8 +208,8 @@ public function testIsNotModifiedEtag()

public function testIsNotModifiedWeakEtag()
{
$etag = 'randomly_generated_etag';
$weakEtag = 'W/randomly_generated_etag';
$etag = '"randomly_generated_etag"';
$weakEtag = 'W/"randomly_generated_etag"';

$request = new Request();
$request->headers->set('If-None-Match', $etag);
Expand Down

0 comments on commit ff1e2c4

Please sign in to comment.