Google\Cloud\Tests\RestTraitTest::testSendsRequestWithOptions PHP Méthode

testSendsRequestWithOptions() public méthode

    public function testSendsRequestWithOptions()
    {
        $httpOptions = ['httpOptions' => ['debug' => true], 'retries' => 5];
        $responseBody = '{"whatAWonderful": "response"}';
        $this->requestWrapper->send(Argument::any(), $httpOptions)->willReturn(new Response(200, [], $responseBody));
        $this->implementation->setRequestBuilder($this->requestBuilder->reveal());
        $this->implementation->setRequestWrapper($this->requestWrapper->reveal());
        $actualResponse = $this->implementation->send('resource', 'method', $httpOptions);
        $this->assertEquals(json_decode($responseBody, true), $actualResponse);
    }