Constants

TIMESTAMP

TIMESTAMP = '1327274290'

NONCE

NONCE = 'e7aa11195ca58349bec8b5ebe351d3497eb9e603'

Properties

$serviceBuilder

$serviceBuilder : 

Type

$server

$server : 

Type

$mockObserver

$mockObserver : 

Type

$mockBasePath

$mockBasePath : 

Type

$config

$config : 

Type

$requests

$requests : 

Type

Methods

getServer()

getServer() : \Guzzle\Tests\Http\Server

Get the global server object used throughout the unit tests of Guzzle

Returns

\Guzzle\Tests\Http\Server

getServiceBuilder()

getServiceBuilder() : \Guzzle\Service\Builder\ServiceBuilder

Get a service builder object that can be used throughout the service tests

Returns

\Guzzle\Service\Builder\ServiceBuilder

setMockBasePath()

setMockBasePath(string  $path) : \Guzzle\Tests\GuzzleTestCase

Set the mock response base path

Parameters

string $path

Path to mock response folder

Returns

\Guzzle\Tests\GuzzleTestCase

addMockedRequest()

addMockedRequest(\Guzzle\Http\Message\RequestInterface  $request) : self

Mark a request as being mocked

Parameters

\Guzzle\Http\Message\RequestInterface $request

Returns

self

getMockedRequests()

getMockedRequests() : array

Get all of the mocked requests

Returns

array

getMockResponse()

getMockResponse(string  $path) : \Guzzle\Http\Message\Response

Get a mock response for a client by mock file name

Parameters

string $path

Relative path to the mock response file

Returns

\Guzzle\Http\Message\Response

setMockResponse()

setMockResponse(\Guzzle\Http\Client  $client, string  $paths) : \Guzzle\Plugin\Mock\MockPlugin

Set a mock response from a mock file on the next client request.

This method assumes that mock response files are located under the Command/Mock/ directory of the Service being tested (e.g. Unfuddle/Command/Mock/). A mock response is added to the next request sent by the client.

Parameters

\Guzzle\Http\Client $client

Client object to modify

string $paths

Path to files within the Mock folder of the service

Returns

\Guzzle\Plugin\Mock\MockPlugin

returns the created mock plugin

compareHeaders()

compareHeaders(array  $filteredHeaders, array  $actualHeaders) : array|boolean

Compare HTTP headers and use special markup to filter values A header prefixed with '!' means it must not exist A header prefixed with '_' means it must be ignored A header value of '*' means anything after the * will be ignored

Parameters

array $filteredHeaders

Array of special headers

array $actualHeaders

Array of headers to check against

Returns

array|boolean —

Returns an array of the differences or FALSE if none

assertContainsIns()

assertContainsIns(string  $needle, string  $haystack, string  $message = null) 

Case insensitive assertContains

Parameters

string $needle

Search string

string $haystack

Search this

string $message

Optional failure message

testSubscribesToEvents()

testSubscribesToEvents() 

testAcceptsConfigurationData()

testAcceptsConfigurationData() 

testCreatesStringToSignFromPostRequest()

testCreatesStringToSignFromPostRequest() 

testCreatesStringToSignIgnoringPostFields()

testCreatesStringToSignIgnoringPostFields() 

testCreatesStringToSignFromPostRequestWithCustomContentType()

testCreatesStringToSignFromPostRequestWithCustomContentType() 

testConvertsBooleansToStrings()

testConvertsBooleansToStrings() 

testCreatesStringToSignFromPostRequestWithNullValues()

testCreatesStringToSignFromPostRequestWithNullValues() 

testMultiDimensionalArray()

testMultiDimensionalArray() 

testMultiDimensionalArrayWithNonDefaultQueryAggregator()

testMultiDimensionalArrayWithNonDefaultQueryAggregator() 

testSignsStrings()

testSignsStrings() 

testSignsOauthRequests()

testSignsOauthRequests() 

Test that the Oauth is signed correctly and that extra strings haven't been added to the authorization header.

testSignsOauthQueryStringRequest()

testSignsOauthQueryStringRequest() 

testInvalidArgumentExceptionOnMethodError()

testInvalidArgumentExceptionOnMethodError() 

testDoesNotAddFalseyValuesToAuthorization()

testDoesNotAddFalseyValuesToAuthorization() 

testOptionalOauthParametersAreNotAutomaticallyAdded()

testOptionalOauthParametersAreNotAutomaticallyAdded() 

getRequest()

getRequest()