PayWithAmazon\ClientTest::testJsonResponse PHP Метод

testJsonResponse() публичный Метод

public testJsonResponse ( )
    public function testJsonResponse()
    {
        $response = array('Status' => '200');
        $response['ResponseBody'] = '<GetOrderReferenceDetailsResponse xmlns="http://mws.amazonservices.com/schema/OffAmazonPayments/2013-01-01">
        <AmazonOrderReferenceId>S01-5806490-2147504</AmazonOrderReferenceId>
        <ExpirationTimestamp>2015-09-27T02:18:33.408Z</ExpirationTimestamp>
        <SellerNote>This is testing API call</SellerNote>
        </GetOrderReferenceDetailsResponse>';
        $json = '{"AmazonOrderReferenceId":"S01-5806490-2147504","ExpirationTimestamp":"2015-09-27T02:18:33.408Z","SellerNote":"This is testing API call","ResponseStatus":"200"}';
        $responseObj = new ResponseParser($response);
        $jsonResponse = $responseObj->toJson();
        $this->assertEquals($json, $jsonResponse);
    }