@@ -1353,9 +1353,9 @@ public function testEsiCacheIncludesEmbeddedResponseContentWhenMainResponseFails
1353
1353
1354
1354
// prime the cache
1355
1355
$ this ->request ('GET ' , '/ ' , [], [], true );
1356
- $ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
1357
- $ this ->assertEquals ('main embedded ' , $ this ->response ->getContent ());
1358
- $ this ->assertEquals ('Mon, 12 Aug 2024 10:05:00 +0000 ' , $ this ->response ->getLastModified ()->format (\DATE_RFC2822 )); // max of both values
1356
+ $ this ->assertSame (200 , $ this ->response ->getStatusCode ());
1357
+ $ this ->assertSame ('main embedded ' , $ this ->response ->getContent ());
1358
+ $ this ->assertSame ('Mon, 12 Aug 2024 10:05:00 +0000 ' , $ this ->response ->getLastModified ()->format (\DATE_RFC2822 )); // max of both values
1359
1359
1360
1360
$ this ->setNextResponses ([
1361
1361
[
@@ -1374,16 +1374,16 @@ public function testEsiCacheIncludesEmbeddedResponseContentWhenMainResponseFails
1374
1374
// Re-request with Last-Modified time that we received when the cache was primed
1375
1375
$ this ->request ('GET ' , '/ ' , ['HTTP_IF_MODIFIED_SINCE ' => 'Mon, 12 Aug 2024 10:05:00 +0000 ' ], [], true );
1376
1376
1377
- $ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
1377
+ $ this ->assertSame (200 , $ this ->response ->getStatusCode ());
1378
1378
1379
1379
// The cache should use the content ("embedded") from the cached entry
1380
- $ this ->assertEquals ('main embedded ' , $ this ->response ->getContent ());
1380
+ $ this ->assertSame ('main embedded ' , $ this ->response ->getContent ());
1381
1381
1382
1382
$ traces = $ this ->cache ->getTraces ();
1383
- $ this ->assertEquals (['stale ' , 'invalid ' , 'store ' ], $ traces ['GET / ' ]);
1383
+ $ this ->assertSame (['stale ' , 'invalid ' , 'store ' ], $ traces ['GET / ' ]);
1384
1384
1385
1385
// The embedded resource was still fresh
1386
- $ this ->assertEquals (['fresh ' ], $ traces ['GET /foo ' ]);
1386
+ $ this ->assertSame (['fresh ' ], $ traces ['GET /foo ' ]);
1387
1387
}
1388
1388
1389
1389
public function testEsiCacheIncludesEmbeddedResponseContentWhenMainResponseFailsRevalidationAndEmbeddedResponseIsValid ()
@@ -1410,9 +1410,9 @@ public function testEsiCacheIncludesEmbeddedResponseContentWhenMainResponseFails
1410
1410
1411
1411
// prime the cache
1412
1412
$ this ->request ('GET ' , '/ ' , [], [], true );
1413
- $ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
1414
- $ this ->assertEquals ('main embedded ' , $ this ->response ->getContent ());
1415
- $ this ->assertEquals ('Mon, 12 Aug 2024 10:05:00 +0000 ' , $ this ->response ->getLastModified ()->format (\DATE_RFC2822 )); // max of both values
1413
+ $ this ->assertSame (200 , $ this ->response ->getStatusCode ());
1414
+ $ this ->assertSame ('main embedded ' , $ this ->response ->getContent ());
1415
+ $ this ->assertSame ('Mon, 12 Aug 2024 10:05:00 +0000 ' , $ this ->response ->getLastModified ()->format (\DATE_RFC2822 )); // max of both values
1416
1416
1417
1417
$ this ->setNextResponses ([
1418
1418
[
@@ -1439,16 +1439,16 @@ public function testEsiCacheIncludesEmbeddedResponseContentWhenMainResponseFails
1439
1439
// Re-request with Last-Modified time that we received when the cache was primed
1440
1440
$ this ->request ('GET ' , '/ ' , ['HTTP_IF_MODIFIED_SINCE ' => 'Mon, 12 Aug 2024 10:05:00 +0000 ' ], [], true );
1441
1441
1442
- $ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
1442
+ $ this ->assertSame (200 , $ this ->response ->getStatusCode ());
1443
1443
1444
1444
// The cache should use the content ("embedded") from the cached entry
1445
- $ this ->assertEquals ('main embedded ' , $ this ->response ->getContent ());
1445
+ $ this ->assertSame ('main embedded ' , $ this ->response ->getContent ());
1446
1446
1447
1447
$ traces = $ this ->cache ->getTraces ();
1448
- $ this ->assertEquals (['stale ' , 'invalid ' , 'store ' ], $ traces ['GET / ' ]);
1448
+ $ this ->assertSame (['stale ' , 'invalid ' , 'store ' ], $ traces ['GET / ' ]);
1449
1449
1450
1450
// Check that the embedded resource was successfully revalidated
1451
- $ this ->assertEquals (['stale ' , 'valid ' , 'store ' ], $ traces ['GET /foo ' ]);
1451
+ $ this ->assertSame (['stale ' , 'valid ' , 'store ' ], $ traces ['GET /foo ' ]);
1452
1452
}
1453
1453
1454
1454
public function testEsiCacheIncludesEmbeddedResponseContentWhenMainAndEmbeddedResponseAreFresh ()
@@ -1475,9 +1475,9 @@ public function testEsiCacheIncludesEmbeddedResponseContentWhenMainAndEmbeddedRe
1475
1475
1476
1476
// prime the cache
1477
1477
$ this ->request ('GET ' , '/ ' , [], [], true );
1478
- $ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
1479
- $ this ->assertEquals ('main embedded ' , $ this ->response ->getContent ());
1480
- $ this ->assertEquals ('Mon, 12 Aug 2024 10:05:00 +0000 ' , $ this ->response ->getLastModified ()->format (\DATE_RFC2822 ));
1478
+ $ this ->assertSame (200 , $ this ->response ->getStatusCode ());
1479
+ $ this ->assertSame ('main embedded ' , $ this ->response ->getContent ());
1480
+ $ this ->assertSame ('Mon, 12 Aug 2024 10:05:00 +0000 ' , $ this ->response ->getLastModified ()->format (\DATE_RFC2822 ));
1481
1481
1482
1482
// Assume that a client received 'Mon, 12 Aug 2024 10:00:00 +0000' as last-modified information in the past. This may, for example,
1483
1483
// be the case when the "main" response at that point had an older Last-Modified time, so the embedded response's Last-Modified time
@@ -1486,16 +1486,16 @@ public function testEsiCacheIncludesEmbeddedResponseContentWhenMainAndEmbeddedRe
1486
1486
// Now this client does a revalidation request.
1487
1487
$ this ->request ('GET ' , '/ ' , ['HTTP_IF_MODIFIED_SINCE ' => 'Mon, 12 Aug 2024 10:00:00 +0000 ' ], [], true );
1488
1488
1489
- $ this ->assertEquals (200 , $ this ->response ->getStatusCode ());
1489
+ $ this ->assertSame (200 , $ this ->response ->getStatusCode ());
1490
1490
1491
1491
// The cache should use the content ("embedded") from the cached entry
1492
- $ this ->assertEquals ('main embedded ' , $ this ->response ->getContent ());
1492
+ $ this ->assertSame ('main embedded ' , $ this ->response ->getContent ());
1493
1493
1494
1494
$ traces = $ this ->cache ->getTraces ();
1495
- $ this ->assertEquals (['fresh ' ], $ traces ['GET / ' ]);
1495
+ $ this ->assertSame (['fresh ' ], $ traces ['GET / ' ]);
1496
1496
1497
1497
// Check that the embedded resource was successfully revalidated
1498
- $ this ->assertEquals (['fresh ' ], $ traces ['GET /foo ' ]);
1498
+ $ this ->assertSame (['fresh ' ], $ traces ['GET /foo ' ]);
1499
1499
}
1500
1500
1501
1501
public function testEsiCacheForceValidation ()
0 commit comments