/** * @test */ public function shouldSetJsonOptionOnPutAndPatchRequests() { $mock = new MockHandler([new Response(200)]); $handler = HandlerStack::create($mock); $client = new Client($this->APIKey, ['handler' => $handler, '_verbosity' => 1]); $options = ['NiceName' => 'New-Album-from-API', 'Title' => 'Ano Different Album Name from API', 'Privacy' => 'Private']; $client->put('album/rAnD0m', $options); $request_options = $client->getRequestOptions(); $this->assertArrayHasKey('json', $request_options); $this->assertEquals($options, $request_options['json']); }