\Heidelpay\Tests\PhpPaymentApi\UnitRequestTest

This unit test will cover an error in the connection and an simple post request to the sandbox payment system.

Please note that connection test can fail due to network issues and scheduled downtime.

Summary

Methods
Properties
Constants
prepareAuthenticationData()
async()
customerAddress()
setBasketData()
compareToArrayWithInputArray()
getBasket()
getRequest()
requestCriterionParameterGroupGetterShouldReturnSetValue()
staticFromJsonMethodShouldReturnNewRequestInstanceOnEmptyJsonObject()
mappedJsonRequestAndToJsonRepresentationOfRequestObjectMustBeEqual()
fromJsonMapperShouldThrowExceptionOnInvalidJson()
staticFromPostMethodShouldReturnNewRequestInstanceOnEmptyArray()
sendShouldCreateCurlAdapterIfNoneExists()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

prepareAuthenticationData()

prepareAuthenticationData() 

Authentication test

async()

async() 

Set parameter for asynchronous response

customerAddress()

customerAddress() 

Customer address test

setBasketData()

setBasketData() 

Basket data test

compareToArrayWithInputArray()

compareToArrayWithInputArray() 

Prepare request test

getBasket()

getBasket() 

Basket parameter group getter test

getRequest()

getRequest() 

Request parameter group getter test

requestCriterionParameterGroupGetterShouldReturnSetValue()

requestCriterionParameterGroupGetterShouldReturnSetValue() 

Test that checks if a set criterion property returns the expected value.

staticFromJsonMethodShouldReturnNewRequestInstanceOnEmptyJsonObject()

staticFromJsonMethodShouldReturnNewRequestInstanceOnEmptyJsonObject() 

Test that checks if the static fromJson method returns an instance of Request.

mappedJsonRequestAndToJsonRepresentationOfRequestObjectMustBeEqual()

mappedJsonRequestAndToJsonRepresentationOfRequestObjectMustBeEqual() 

Test that checks if an existing Request instance and an instance created by the fromJson mapper are matching ParameterGroup instances and their respective properies and values.

fromJsonMapperShouldThrowExceptionOnInvalidJson()

fromJsonMapperShouldThrowExceptionOnInvalidJson() 

Test that checks if a JsonParserException will be thrown when an invalid JSON string is being provided to the fromJson method.

staticFromPostMethodShouldReturnNewRequestInstanceOnEmptyArray()

staticFromPostMethodShouldReturnNewRequestInstanceOnEmptyArray() 

Test that checks if the static fromPost method returns an instance of Request.

sendShouldCreateCurlAdapterIfNoneExists()

sendShouldCreateCurlAdapterIfNoneExists()