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 Mock

Mockery\Mock implements Mockery\MockInterface
Namespace: Mockery
Located at Mockery/Mock.php
Methods summary
public
# mockery_init( Mockery\Container $container = null, object $partialObject = null )

We want to avoid constructors since class is copied to Generator.php for inclusion on extending class definitions.

We want to avoid constructors since class is copied to Generator.php for inclusion on extending class definitions.

Parameters

$container
$partialObject

Implementation of

Mockery\MockInterface::mockery_init()
public Mockery\Expectation
# shouldReceive( )

Set expected method calls

Set expected method calls

Returns

Mockery\Expectation

Implementation of

Mockery\MockInterface::shouldReceive()
public Mockery\Mock
# shouldAllowMockingMethod( String $method )

Allows additional methods to be mocked that do not explicitly exist on mocked class

Allows additional methods to be mocked that do not explicitly exist on mocked class

Parameters

$method
name of the method to be mocked

Returns

Mockery\Mock

Implementation of

Mockery\MockInterface::shouldAllowMockingMethod()
public Mockery\Mock
# shouldIgnoreMissing( mixed $returnValue = null )

Set mock to ignore unexpected methods and return Undefined class

Set mock to ignore unexpected methods and return Undefined class

Parameters

$returnValue
the default return value for calls to missing functions on this mock

Returns

Mockery\Mock

Implementation of

Mockery\MockInterface::shouldIgnoreMissing()
public
# asUndefined( )
public Mockery\Mock
# shouldAllowMockingProtectedMethods( )

Returns

Mockery\Mock

Implementation of

Mockery\MockInterface::shouldAllowMockingProtectedMethods()
public Mockery\Mock
# shouldDeferMissing( )

Set mock to defer unexpected methods to it's parent

Set mock to defer unexpected methods to it's parent

This is particularly useless for this class, as it doesn't have a parent, but included for completeness

Returns

Mockery\Mock

Implementation of

Mockery\MockInterface::shouldDeferMissing()
public Mockery\Mock
# makePartial( )

Create an obviously worded alias to shouldDeferMissing()

Create an obviously worded alias to shouldDeferMissing()

Returns

Mockery\Mock
public
# shouldExpect( Closure $closure )

Accepts a closure which is executed with an object recorder which proxies to the partial source object. The intent being to record the interactions of a concrete object as a set of expectations on the current mock object. The partial may then be passed to a second process to see if it fulfils the same (or exact same) contract as the original.

Accepts a closure which is executed with an object recorder which proxies to the partial source object. The intent being to record the interactions of a concrete object as a set of expectations on the current mock object. The partial may then be passed to a second process to see if it fulfils the same (or exact same) contract as the original.

Parameters

$closure
public Mockery\Mock
# byDefault( )

In the event shouldReceive() accepting one or more methods/returns, this method will switch them from normal expectations to default expectations

In the event shouldReceive() accepting one or more methods/returns, this method will switch them from normal expectations to default expectations

Returns

Mockery\Mock

Implementation of

Mockery\MockInterface::byDefault()
public
# __call( $method, array $args )

Capture calls to this mock

Capture calls to this mock

public static
# __callStatic( $method, array $args )
public
# __toString( )

Forward calls to this magic method to the __call method

Forward calls to this magic method to the __call method

public
# mockery_verify( )

Iterate across all expectation directors and validate each

Iterate across all expectation directors and validate each

Throws

Mockery\CountValidator\Exception

Implementation of

Mockery\MockInterface::mockery_verify()
public
# mockery_teardown( )

Tear down tasks for this mock

Tear down tasks for this mock

Implementation of

Mockery\MockInterface::mockery_teardown()
public integer
# mockery_allocateOrder( )

Fetch the next available allocation order number

Fetch the next available allocation order number

Returns

integer

Implementation of

Mockery\MockInterface::mockery_allocateOrder()
public
# mockery_setGroup( mixed $group, integer $order )

Set ordering for a group

Set ordering for a group

Parameters

$group
$order

Implementation of

Mockery\MockInterface::mockery_setGroup()
public array
# mockery_getGroups( )

Fetch array of ordered groups

Fetch array of ordered groups

Returns

array

Implementation of

Mockery\MockInterface::mockery_getGroups()
public
# mockery_setCurrentOrder( integer $order )

Set current ordered number

Set current ordered number

Parameters

$order

Implementation of

Mockery\MockInterface::mockery_setCurrentOrder()
public integer
# mockery_getCurrentOrder( )

Get current ordered number

Get current ordered number

Returns

integer

Implementation of

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

Validate the current mock's ordering

Validate the current mock's ordering

Parameters

$method
$order

Throws

Mockery\Exception

Implementation of

Mockery\MockInterface::mockery_validateOrder()
public integer
# mockery_getExpectationCount( )

Gets the count of expectations for this mock

Gets the count of expectations for this mock

Returns

integer

Implementation of

Mockery\MockInterface::mockery_getExpectationCount()
public Mockery\ExpectationDirector|null
# mockery_setExpectationsFor( $method, Mockery\ExpectationDirector $director )

Return the expectations director for the given method

Return the expectations director for the given method

Returns

Mockery\ExpectationDirector|null

Var

string $method

Implementation of

Mockery\MockInterface::mockery_setExpectationsFor()
public Mockery\ExpectationDirector|null
# mockery_getExpectationsFor( $method )

Return the expectations director for the given method

Return the expectations director for the given method

Returns

Mockery\ExpectationDirector|null

Var

string $method

Implementation of

Mockery\MockInterface::mockery_getExpectationsFor()
public Mockery\Expectation|null
# mockery_findExpectation( $method, array $args )

Find an expectation matching the given method and arguments

Find an expectation matching the given method and arguments

Returns

Mockery\Expectation|null

Var

string $method
array $args

Implementation of

Mockery\MockInterface::mockery_findExpectation()
public Mockery\Container
# mockery_getContainer( )

Return the container for this mock

Return the container for this mock

Returns

Mockery\Container

Implementation of

Mockery\MockInterface::mockery_getContainer()
public string
# mockery_getName( )

Return the name for this mock

Return the name for this mock

Returns

string

Implementation of

Mockery\MockInterface::mockery_getName()
public array
# mockery_getMockableProperties( )

Returns

array

Implementation of

Mockery\MockInterface::mockery_getMockableProperties()
public
# __isset( $name )
public
# mockery_getExpectations( )
public mixed
# mockery_callSubjectMethod( string $name, array $args )

Calls a parent class method and returns the result. Used in a passthru expectation where a real return value is required while still taking advantage of expectation matching and call count verification.

Calls a parent class method and returns the result. Used in a passthru expectation where a real return value is required while still taking advantage of expectation matching and call count verification.

Parameters

$name
$args

Returns

mixed
public string[]
# mockery_getMockableMethods( )

Returns

string[]

Implementation of

Mockery\MockInterface::mockery_getMockableMethods()
public boolean
# mockery_isAnonymous( )

Returns

boolean

Implementation of

Mockery\MockInterface::mockery_isAnonymous()
public
# __wakeup( )
public
# mockery_getMethod( $name )
public Mockery\Expectation
# shouldHaveReceived( $method, null $args = null )

Parameters

$method
$args

Returns

Mockery\Expectation

Implementation of

Mockery\MockInterface::shouldHaveReceived()
public null
# shouldNotHaveReceived( $method, null $args = null )

Parameters

$method
$args

Returns

null

Implementation of

Mockery\MockInterface::shouldNotHaveReceived()
protected static
# _mockery_handleStaticMethodCall( $method, array $args )
protected
# _mockery_getReceivedMethodCalls( )
protected
# _mockery_handleMethodCall( $method, array $args )
protected
# mockery_getMethods( )
Properties summary
protected array $_mockery_expectations

Stores an array of all expectation directors for this mock

Stores an array of all expectation directors for this mock

# array()
protected boolean $_mockery_ignoreMissing

Flag to indicate whether we can ignore method calls missing from our expectations

Flag to indicate whether we can ignore method calls missing from our expectations

# false
protected boolean $_mockery_deferMissing

Flag to indicate whether we can defer method calls missing from our expectations

Flag to indicate whether we can defer method calls missing from our expectations

# false
protected boolean $_mockery_verified

Flag to indicate whether this mock was verified

Flag to indicate whether this mock was verified

# false
protected string $_mockery_name

Given name of the mock

Given name of the mock

# null
protected integer $_mockery_allocatedOrder

Order number of allocation

Order number of allocation

# 0
protected integer $_mockery_currentOrder

Current ordered number

Current ordered number

# 0
protected array $_mockery_groups

Ordered groups

Ordered groups

# array()
protected Mockery\Container $_mockery_container

Mock container containing this mock object

Mock container containing this mock object

# null
protected object $_mockery_partial

Instance of a core object on which methods are called in the event it has been set, and an expectation for one of the object's methods does not exist. This implements a simple partial mock proxy system.

Instance of a core object on which methods are called in the event it has been set, and an expectation for one of the object's methods does not exist. This implements a simple partial mock proxy system.

# null
protected boolean $_mockery_disableExpectationMatching

Flag to indicate we should ignore all expectations temporarily. Used mainly to prevent expectation matching when in the middle of a mock object recording session.

Flag to indicate we should ignore all expectations temporarily. Used mainly to prevent expectation matching when in the middle of a mock object recording session.

# false
protected array $_mockery_mockableProperties

Stores all stubbed public methods separate from any on-object public properties that may exist.

Stores all stubbed public methods separate from any on-object public properties that may exist.

# array()
protected array $_mockery_mockableMethods
# array()
protected static ReflectionMethod[] $_mockery_methods

Just a local cache for this mock's target's methods

Just a local cache for this mock's target's methods

#
protected boolean $_mockery_allowMockingProtectedMethods
# false
protected $_mockery_receivedMethodCalls
#
protected mixed $_mockery_defaultReturnValue

If shouldIgnoreMissing is called, this value will be returned on all calls to missing methods

If shouldIgnoreMissing is called, this value will be returned on all calls to missing methods

# null
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen