Overview

Namespaces

  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
    • Tests
      • Batch
      • Cache
      • Common
        • Cache
        • Exception
      • Http
        • Curl
        • Exception
        • Message
          • Header
      • Inflection
      • Iterator
      • Log
      • Message
      • Mock
      • Parser
        • Cookie
        • Message
      • Parsers
        • UriTemplate
      • Plugin
        • Async
        • Backoff
        • Cache
        • Cookie
          • CookieJar
        • CurlAuth
        • ErrorResponse
        • History
        • Log
        • Md5
        • Mock
        • Oauth
        • Redirect
      • Service
        • Builder
        • Command
          • LocationVisitor
            • Request
            • Response
        • Description
        • Exception
        • Mock
          • Command
            • Sub
          • Model
        • Resource
      • Stream
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • VivaPayments
      • Message
  • PHP

Classes

  • GuzzleTestCase
  • Overview
  • Namespace
  • Class
  • Tree

Class GuzzleTestCase

Base testcase class for all Guzzle testcases.

PHPUnit_Framework_TestCase
Extended by Guzzle\Tests\GuzzleTestCase

Direct known subclasses

Guzzle\Tests\Batch\AbstractBatchDecoratorTest, Guzzle\Tests\Batch\BatchBuilderTest, Guzzle\Tests\Batch\HistoryBatchTest, Guzzle\Tests\Service\CachingConfigLoaderTest, Guzzle\Tests\Service\ClientTest, Guzzle\Tests\Service\Command\AbstractCommandTest, Guzzle\Tests\Service\Command\AliasFactoryTest, Guzzle\Tests\Service\Command\ClosureCommandTest, Guzzle\Tests\Service\Command\CompositeFactoryTest, Guzzle\Tests\Service\Command\ConcreteClassFactoryTest, Guzzle\Tests\Service\Command\DefaultRequestSerializerTest, Guzzle\Tests\Service\Command\DefaultResponseParserTest, Guzzle\Tests\Service\Command\LocationVisitor\Request\AbstractVisitorTestCase, Guzzle\Tests\Batch\NotifyingBatchTest, Guzzle\Tests\Service\Command\LocationVisitor\Response\AbstractResponseVisitorTest, Guzzle\Tests\Service\Command\MapFactoryTest, Guzzle\Tests\Service\Command\OperationCommandTest, Guzzle\Tests\Service\Command\OperationResponseParserTest, Guzzle\Tests\Service\Command\ServiceDescriptionFactoryTest, Guzzle\Tests\Service\Command\VisitorFlyweightTest, Guzzle\Tests\Service\Description\OperationTest, Guzzle\Tests\Service\Description\ParameterTest, Guzzle\Tests\Service\Description\SchemaFormatterTest, Guzzle\Tests\Service\Description\SchemaValidatorTest, Guzzle\Tests\Cache\CacheAdapterFactoryTest, Guzzle\Tests\Service\Description\ServiceDescriptionLoaderTest, Guzzle\Tests\Service\Description\ServiceDescriptionTest, Guzzle\Tests\Service\Exception\CommandTransferExceptionTest, Guzzle\Tests\Service\Exception\InconsistentClientTransferExceptionTest, Guzzle\Tests\Service\Exception\ValidationExceptionTest, Guzzle\Tests\Service\Resource\CompositeResourceIteratorFactoryTest, Guzzle\Tests\Service\Resource\MapResourceIteratorFactoryTest, Guzzle\Tests\Service\Resource\ModelTest, Guzzle\Tests\Service\Resource\ResourceIteratorClassFactoryTest, Guzzle\Tests\Service\Resource\ResourceIteratorTest, Guzzle\Tests\Cache\CacheAdapterTest, Guzzle\Tests\Service\ServiceBuilderTest, Guzzle\Tests\Stream\PhpStreamRequestFactoryTest, Guzzle\Tests\Stream\StreamTest, Guzzle\Tests\Cache\ClosureCacheAdapterTest, Guzzle\Tests\Cache\Zf2CacheAdapterTest, Guzzle\Tests\Common\AbstractHasAdapterTest, Guzzle\Tests\Common\Cache\NullCacheAdapterTest, Guzzle\Tests\Common\CollectionTest, Guzzle\Tests\Common\EventTest, Guzzle\Tests\Batch\BatchClosureDivisorTest, Guzzle\Tests\Common\Exception\BatchTransferExceptionTest, Guzzle\Tests\Common\Exception\ExceptionCollectionTest, Guzzle\Tests\Common\VersionTest, Guzzle\Tests\Http\AbstractEntityBodyDecoratorTest, Guzzle\Tests\Http\CachingEntityBodyTest, Guzzle\Tests\Http\ClientTest, Guzzle\Tests\Http\CommaAggregatorTest, Guzzle\Tests\Http\Curl\CurlHandleTest, Guzzle\Tests\Http\Curl\CurlMultiProxyTest, Guzzle\Tests\Http\Curl\CurlMultiTest, Guzzle\Tests\Batch\BatchClosureTransferTest, Guzzle\Tests\Http\Curl\CurlVersionTest, Guzzle\Tests\Http\Curl\RequestMediatorTest, Guzzle\Tests\Http\DuplicateAggregatorTest, Guzzle\Tests\Http\EntityBodyTest, Guzzle\Tests\Http\Exception\CurlExceptionTest, Guzzle\Tests\Http\Exception\ExceptionTest, Guzzle\Tests\Http\Exception\MultiTransferExceptionTest, Guzzle\Tests\Http\IoEmittingEntityBodyTest, Guzzle\Tests\Http\Message\AbstractMessageTest, Guzzle\Tests\Http\Message\EntityEnclosingRequestTest, Guzzle\Tests\Batch\BatchCommandTransferTest, Guzzle\Tests\Http\Message\Header\HeaderFactoryTest, Guzzle\Tests\Http\Message\Header\LinkTest, Guzzle\Tests\Http\Message\HeaderTest, Guzzle\Tests\Http\Message\HttpRequestFactoryTest, Guzzle\Tests\Http\Message\PostFileTest, Guzzle\Tests\Http\Message\RequestTest, Guzzle\Tests\Http\MimetypesTest, Guzzle\Tests\Http\PhpAggregatorTest, Guzzle\Tests\Http\QueryStringTest, Guzzle\Tests\Http\ReadLimitEntityBodyTest, Guzzle\Tests\Batch\BatchRequestTransferTest, Guzzle\Tests\Http\UrlTest, Guzzle\Tests\Inflection\InflectorTest, Guzzle\Tests\Inflection\MemoizingInflectorTest, Guzzle\Tests\Inflection\PreComputedInflectorTest, Guzzle\Tests\Log\ArrayLogAdapterTest, Guzzle\Tests\Log\ClosureLogAdapterTest, Guzzle\Tests\Log\MessageFormatterTest, Guzzle\Tests\Log\PsrLogAdapterTest, Guzzle\Tests\Log\Zf2LogAdapterTest, Guzzle\Tests\Message\HeaderComparisonTest, Guzzle\Tests\Batch\BatchSizeDivisorTest, Guzzle\Tests\Message\ResponseTest, Guzzle\Tests\Parser\Cookie\CookieParserProvider, Guzzle\Tests\Parser\Message\MessageParserProvider, Guzzle\Tests\Parser\ParserRegistryTest, Guzzle\Tests\Parsers\UriTemplate\AbstractUriTemplateTest, Guzzle\Tests\Plugin\Async\AsyncPluginTest, Guzzle\Tests\Plugin\Backoff\AbstractBackoffStrategyTest, Guzzle\Tests\Plugin\Backoff\BackoffLoggerTest, Guzzle\Tests\Plugin\Backoff\BackoffPluginTest, Guzzle\Tests\Plugin\Backoff\CallbackBackoffStrategyTest, Guzzle\Tests\Batch\BatchTest, Guzzle\Tests\Plugin\Backoff\ConstantBackoffStrategyTest, Guzzle\Tests\Plugin\Backoff\CurlBackoffStrategyTest, Guzzle\Tests\Plugin\Backoff\ExponentialBackoffStrategyTest, Guzzle\Tests\Plugin\Backoff\HttpBackoffStrategyTest, Guzzle\Tests\Plugin\Backoff\LinearBackoffStrategyTest, Guzzle\Tests\Plugin\Backoff\ReasonPhraseBackoffStrategyTest, Guzzle\Tests\Plugin\Backoff\TruncatedBackoffStrategyTest, Guzzle\Tests\Plugin\Cache\CachePluginTest, Guzzle\Tests\Plugin\Cache\CallbackCanCacheStrategyTest, Guzzle\Tests\Plugin\Cache\DefaultCacheStorageTest, Guzzle\Tests\Batch\ExceptionBufferingBatchTest, Guzzle\Tests\Plugin\Cache\DefaultCanCacheStrategyTest, Guzzle\Tests\Plugin\Cache\DefaultRevalidationTest, Guzzle\Tests\Plugin\Cache\DenyRevalidationTest, Guzzle\Tests\Plugin\Cache\SkipRevalidationTest, Guzzle\Tests\Plugin\Cookie\CookieJar\ArrayCookieJarTest, Guzzle\Tests\Plugin\Cookie\CookieJar\FileCookieJarTest, Guzzle\Tests\Plugin\Cookie\CookiePluginTest, Guzzle\Tests\Plugin\Cookie\CookieTest, Guzzle\Tests\Plugin\CurlAuth\CurlAuthPluginTest, Guzzle\Tests\Plugin\ErrorResponse\ErrorResponsePluginTest, Guzzle\Tests\Batch\FlushingBatchTest, Guzzle\Tests\Plugin\History\HistoryPluginTest, Guzzle\Tests\Plugin\Log\LogPluginTest, Guzzle\Tests\Plugin\Md5\CommandContentMd5PluginTest, Guzzle\Tests\Plugin\Md5\Md5ValidatorPluginTest, Guzzle\Tests\Plugin\Mock\MockPluginTest, Guzzle\Tests\Plugin\Oauth\OauthPluginTest, Guzzle\Tests\Plugin\Redirect\RedirectPluginTest, Guzzle\Tests\Plugin\Redirect\StaticClientTest, Guzzle\Tests\Service\AbstractConfigLoaderTest, Guzzle\Tests\Service\Builder\ServiceBuilderLoaderTest

Indirect known subclasses

Guzzle\Tests\Parser\Cookie\CookieParserTest, Guzzle\Tests\Parser\Message\MessageParserTest, Guzzle\Tests\Service\Command\LocationVisitor\Request\PostFileVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Request\QueryVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Request\ResponseBodyVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Request\XmlVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Response\BodyVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Response\HeaderVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Response\JsonVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Response\ReasonPhraseVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Response\StatusCodeVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Response\XmlVisitorTest, Guzzle\Tests\Parser\Message\PeclHttpMessageParserTest, Guzzle\Tests\Parsers\UriTemplate\PeclUriTemplateTest, Guzzle\Tests\Parsers\UriTemplate\UriTemplateTest, Guzzle\Tests\Service\Command\CommandTest, Guzzle\Tests\Service\Command\LocationVisitor\Request\BodyVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Request\HeaderVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Request\JsonVisitorTest, Guzzle\Tests\Service\Command\LocationVisitor\Request\PostFieldVisitorTest
Abstract
Namespace: Guzzle\Tests
Located at tests/Guzzle/Tests/GuzzleTestCase.php
Methods summary
public static Guzzle\Tests\Http\Server
# getServer( )

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

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

Returns

Guzzle\Tests\Http\Server
public static
# setServiceBuilder( Guzzle\Service\Builder\ServiceBuilderInterface $builder )

Set the service builder to use for tests

Set the service builder to use for tests

Parameters

$builder
Service builder
public static Guzzle\Service\Builder\ServiceBuilder
# getServiceBuilder( )

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

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

Returns

Guzzle\Service\Builder\ServiceBuilder
protected boolean
# hasSubscriber( Guzzle\Common\HasDispatcherInterface $dispatcher, Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber )

Check if an event dispatcher has a subscriber

Check if an event dispatcher has a subscriber

Parameters

$dispatcher
$subscriber

Returns

boolean
public Guzzle\Tests\Mock\MockObserver
# getWildcardObserver( Guzzle\Common\HasDispatcherInterface $hasDispatcher )

Get a wildcard observer for an event dispatcher

Get a wildcard observer for an event dispatcher

Parameters

$hasDispatcher

Returns

Guzzle\Tests\Mock\MockObserver
public static Guzzle\Tests\GuzzleTestCase
# setMockBasePath( string $path )

Set the mock response base path

Set the mock response base path

Parameters

$path
Path to mock response folder

Returns

Guzzle\Tests\GuzzleTestCase
public Guzzle\Tests\GuzzleTestCase
# addMockedRequest( Guzzle\Http\Message\RequestInterface $request )

Mark a request as being mocked

Mark a request as being mocked

Parameters

$request

Returns

Guzzle\Tests\GuzzleTestCase
public array
# getMockedRequests( )

Get all of the mocked requests

Get all of the mocked requests

Returns

array
public Guzzle\Http\Message\Response
# getMockResponse( string $path )

Get a mock response for a client by mock file name

Get a mock response for a client by mock file name

Parameters

$path
Relative path to the mock response file

Returns

Guzzle\Http\Message\Response
public Guzzle\Plugin\Mock\MockPlugin
# setMockResponse( Guzzle\Http\Client $client, string $paths )

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

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

$client
Client object to modify
$paths
Path to files within the Mock folder of the service

Returns

Guzzle\Plugin\Mock\MockPlugin
returns the created mock plugin
public array|boolean
# compareHeaders( array $filteredHeaders, array $actualHeaders )

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

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

$filteredHeaders
Array of special headers
$actualHeaders
Array of headers to check against

Returns

array|boolean
Returns an array of the differences or FALSE if none
public
# assertContainsIns( string $needle, string $haystack, string $message = null )

Case insensitive assertContains

Case insensitive assertContains

Parameters

$needle
Search string
$haystack
Search this
$message
Optional failure message
Properties summary
protected static $mockBasePath
#
public static $serviceBuilder
#
public static $server
#
public $mockObserver
#
Omnipay Viva Payments Gateway Module API Documentation API documentation generated by ApiGen