'bar']); $request = new Request('POST', 'http://httbin.org'); $param = new Parameter(['name' => 'foo']); $request = $location->visit($command, $request, $param); $header = $request->getHeader('foo'); $this->assertTrue(is_array($header)); $this->assertArraySubset([0 => 'bar'], $request->getHeader('foo')); } /** * @group RequestLocation */ public function testAddsAdditionalProperties() { $location = new HeaderLocation('header'); $command = new Command('foo', ['foo' => 'bar']); $command['add'] = 'props'; $operation = new Operation([ 'additionalParameters' => [ 'location' => 'header' ] ]); $request = new Request('POST', 'http://httbin.org'); $request = $location->after($command, $request, $operation); $header = $request->getHeader('add'); $this->assertTrue(is_array($header)); $this->assertArraySubset([0 => 'props'], $header); } }