Google\Cloud\Tests\RestTraitTest::testSendsRequest PHP 메소드

testSendsRequest() 공개 메소드

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