public function test_get_and_set_headers() { $request = new HttpRequest(); $headers = new HttpHeaders(['foo' => 'bar']); $request->setHeaders($headers); $this->assertEquals('bar', $request->getHeaders()->find('foo')); $this->assertNull($request->getHeaders()->find('bar')); $request->getHeaders()->set('bar', 'foo'); $this->assertEquals('foo', $request->getHeaders()->find('bar')); $this->assertEquals('yolo', $request->getHeaders()->find('swag', 'yolo')); }