function FileCookieJarShimTest::testHardenedClassIsLoaded
Confirms the hardened replacement (with __wakeup) is the class in use.
File
-
core/
tests/ Drupal/ Tests/ Component/ Cookie/ FileCookieJarShimTest.php, line 59
Class
- FileCookieJarShimTest
- Tests the hardened backport of \GuzzleHttp\Cookie\FileCookieJar.
Namespace
Drupal\Tests\Component\CookieCode
public function testHardenedClassIsLoaded() : void {
$reflection = new \ReflectionClass(FileCookieJar::class);
$this->assertTrue($reflection->hasMethod('__wakeup'), 'The hardened FileCookieJar must define __wakeup(); its presence indicates the core backport is loaded instead of the unhardened Guzzle 7 class.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.