Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • CompositeExpectation
  • Configuration
  • Container
  • Expectation
  • ExpectationDirector
  • Loader
  • MethodCall
  • Mock
  • ReceivedMethodCalls
  • Recorder
  • Undefined
  • VerificationDirector
  • VerificationExpectation

Interfaces

  • Exception
  • ExpectationInterface
  • MockInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class Container

Namespace: Mockery
Located at Mockery/Container.php
Methods summary
public
# __construct( Mockery\Generator\Generator $generator = null, Mockery\Loader\Loader $loader = null )
public Mockery\Mock
# mock( )

Generates a new mock object for this container

Generates a new mock object for this container

I apologies in advance for this. A God Method just fits the API which doesn't require differentiating between classes, interfaces, abstracts, names or partials - just so long as it's something that can be mocked. I'll refactor it one day so it's easier to follow.

Returns

Mockery\Mock

Throws

Mockery\Exception\RuntimeException
Mockery\Exception
public
# instanceMock( )
public
# getLoader( )
public
# getGenerator( )
public string|null
# getKeyOfDemeterMockFor( string $method )

Parameters

$method

Returns

string|null
public array
# getMocks( )

Returns

array
public
# mockery_teardown( )

Tear down tasks for this container

Tear down tasks for this container

Throws

Exception
public
# mockery_verify( )

Verify the container mocks

Verify the container mocks

public
# mockery_close( )

Reset the container to its original state

Reset the container to its original state

public integer
# mockery_allocateOrder( )

Fetch the next available allocation order number

Fetch the next available allocation order number

Returns

integer
public
# mockery_setGroup( mixed $group, integer $order )

Set ordering for a group

Set ordering for a group

Parameters

$group
$order
public array
# mockery_getGroups( )

Fetch array of ordered groups

Fetch array of ordered groups

Returns

array
public integer
# mockery_setCurrentOrder( integer $order )

Set current ordered number

Set current ordered number

Parameters

$order

Returns

integer
The current order number that was set
public integer
# mockery_getCurrentOrder( )

Get current ordered number

Get current ordered number

Returns

integer
public
# mockery_validateOrder( string $method, integer $order, Mockery\MockInterface $mock )

Validate the current mock's ordering

Validate the current mock's ordering

Parameters

$method
$order
$mock

Throws

Mockery\Exception
public integer
# mockery_getExpectationCount( )

Gets the count of expectations on the mocks

Gets the count of expectations on the mocks

Returns

integer
public Mockery\Mock
# rememberMock( Mockery\MockInterface $mock )

Store a mock and set its container reference

Store a mock and set its container reference

Parameters

$mock

Returns

Mockery\Mock
public Mockery\Mock
# self( )

Retrieve the last remembered mock object, which is the same as saying retrieve the current mock being programmed where you have yet to call mock() to change it - thus why the method name is "self" since it will be be used during the programming of the same mock.

Retrieve the last remembered mock object, which is the same as saying retrieve the current mock being programmed where you have yet to call mock() to change it - thus why the method name is "self" since it will be be used during the programming of the same mock.

Returns

Mockery\Mock
public Mockery\Mock
# fetchMock( $reference )

Return a specific remembered mock according to the array index it was stored to in this container instance

Return a specific remembered mock according to the array index it was stored to in this container instance

Returns

Mockery\Mock
protected
# _getInstance( $mockName, $constructorArgs = null )
public
# declareClass( string $fqcn )

Takes a class name and declares it

Takes a class name and declares it

Parameters

$fqcn
protected
# checkForNamedMockClashes( $config )
Constants summary
string BLOCKS
# Mockery::BLOCKS
Properties summary
protected array $_mocks

Store of mock objects

Store of mock objects

# array()
protected integer $_allocatedOrder

Order number of allocation

Order number of allocation

# 0
protected integer $_currentOrder

Current ordered number

Current ordered number

# 0
protected array $_groups

Ordered groups

Ordered groups

# array()
protected Mockery\Generator\Generator $_generator
#
protected Mockery\Loader\Loader $_loader
#
protected array $_namedMocks
# array()
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen