public function test_json_is_set_on_request() { $client = $this->prophesize(ClientInterface::class); $client->createRequest('POST', 'path', ['json' => ['X-Foo' => 'bar'], 'exceptions' => false])->shouldBeCalled(); $def = ['method' => 'POST', 'path' => 'path', 'params' => ['Foo' => ['type' => 'string', 'location' => 'json', 'sentAs' => 'X-Foo']]]; $userVals = ['Foo' => 'bar']; $operation = new Operation($client->reveal(), $def, $userVals); $operation->createRequest(); }