Example #1
0
 public function testWithCookieClonesRequestAndSetsValueInCookieJar()
 {
     $faker = $this->getFaker();
     $key = $faker->word;
     $value = $faker->word;
     $request = new Request();
     /* @var Request $mutated */
     $mutated = $request->withCookie($key, $value);
     $this->assertInstanceOf(Request::class, $mutated);
     $this->assertNotSame($request, $mutated);
     $this->assertSame($value, $mutated->getCookie($key));
     $this->assertSame($value, $request->getCookie($key));
 }