PHP Class Phue\Test\Transport\HttpTest

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: sqmk/phue

Méthodes publiques

Méthode Description
providerErrorTypes ( ) : array Provider: Error types
setUp ( ) Set up
testClientProperty ( ) Test: Client property
testCustomAdapter ( ) Test: Custom adapter
testGetDefaultAdapter ( ) Test: Get default adapter
testSendRequestArray ( ) Test: Send request with array response
testSendRequestBadContentType ( ) Test: Send request with bad content type
testSendRequestBadStatusCode ( ) Test: Send request with bad status code
testSendRequestErrorResponse ( ) Test: Send request with error response
testSendRequestSuccess ( ) Test: Send request with success resposne
testThrowExceptionByType ( $type, $exceptionName ) Test: Throw exception by type

Méthodes protégées

Méthode Description
stubMockAdapterResponseMethods ( string $response, string $httpStatusCode, string $contentType ) Stub adapter response methods

Method Details

providerErrorTypes() public méthode

Provider: Error types
public providerErrorTypes ( ) : array
Résultat array

setUp() public méthode

Set up
public setUp ( )

stubMockAdapterResponseMethods() protected méthode

Stub adapter response methods
protected stubMockAdapterResponseMethods ( string $response, string $httpStatusCode, string $contentType )
$response string Response body
$httpStatusCode string Http status code
$contentType string Content type

testClientProperty() public méthode

Test: Client property
public testClientProperty ( )

testCustomAdapter() public méthode

Test: Custom adapter
public testCustomAdapter ( )

testGetDefaultAdapter() public méthode

Test: Get default adapter

testSendRequestArray() public méthode

Test: Send request with array response

testSendRequestBadContentType() public méthode

Test: Send request with bad content type

testSendRequestBadStatusCode() public méthode

Test: Send request with bad status code

testSendRequestErrorResponse() public méthode

Test: Send request with error response

testSendRequestSuccess() public méthode

Test: Send request with success resposne

testThrowExceptionByType() public méthode

Test: Throw exception by type
public testThrowExceptionByType ( $type, $exceptionName )