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

  • CachingGenerator
  • DefinedTargetClass
  • Method
  • MockConfiguration
  • MockConfigurationBuilder
  • MockDefinition
  • Parameter
  • StringManipulationGenerator
  • UndefinedTargetClass

Interfaces

  • Generator
  • TargetClass
  • Overview
  • Namespace
  • Class
  • Tree

Class MockConfiguration

This class describes the configuration of mocks and hides away some of the reflection implementation

Namespace: Mockery\Generator
Located at Mockery/Generator/MockConfiguration.php
Methods summary
public
# __construct( array $targets = array(), array $blackListedMethods = array(), array $whiteListedMethods = array(), $name = null, $instanceMock = false, array $parameterOverrides = array() )
public string
# getHash( )

Attempt to create a hash of the configuration, in order to allow caching

Attempt to create a hash of the configuration, in order to allow caching

Returns

string
public
# getMethodsToMock( )

Gets a list of methods from the classes, interfaces and objects and filters them appropriately. Lot's of filtering going on, perhaps we could have filter classes to iterate through

Gets a list of methods from the classes, interfaces and objects and filters them appropriately. Lot's of filtering going on, perhaps we could have filter classes to iterate through

public
# requiresCallTypeHintRemoval( )

We declare the __call method to handle undefined stuff, if the class we're mocking has also defined it, we need to comply with their interface

We declare the __call method to handle undefined stuff, if the class we're mocking has also defined it, we need to comply with their interface

public
# requiresCallStaticTypeHintRemoval( )

We declare the __callStatic method to handle undefined stuff, if the class we're mocking has also defined it, we need to comply with their interface

We declare the __callStatic method to handle undefined stuff, if the class we're mocking has also defined it, we need to comply with their interface

public
# rename( $className )
protected
# addTarget( $target )
protected
# addTargets( $interfaces )
public
# getTargetClassName( )
public
# getTargetClass( )
public
# getTargetInterfaces( )
public
# getTargetObject( )
public
# getName( )
public
# generateName( )

Generate a suitable name based on the config

Generate a suitable name based on the config

public
# getShortName( )
public
# getNamespaceName( )
public
# getBlackListedMethods( )
public
# getWhiteListedMethods( )
public
# isInstanceMock( )
public
# getParameterOverrides( )
protected
# setTargetClassName( $targetClassName )
protected
# getAllMethods( )
protected
# addTargetInterfaceName( $targetInterface )

If we attempt to implement Traversable, we must ensure we are also implementing either Iterator or IteratorAggregate, and that whichever one it is comes before Traversable in the list of implements.

If we attempt to implement Traversable, we must ensure we are also implementing either Iterator or IteratorAggregate, and that whichever one it is comes before Traversable in the list of implements.

protected
# setTargetObject( $object )
Properties summary
protected static integer $mockCounter
# 0
protected $targetClass

A class that we'd like to mock

A class that we'd like to mock

#
protected $targetClassName
#
protected array $targetInterfaces

A number of interfaces we'd like to mock, keyed by name to attempt to keep unique

A number of interfaces we'd like to mock, keyed by name to attempt to keep unique

# array()
protected array $targetInterfaceNames
# array()
protected $targetObject

An object we'd like our mock to proxy to

An object we'd like our mock to proxy to

#
protected $name

The class name we'd like to use for a generated mock

The class name we'd like to use for a generated mock

#
protected array $blackListedMethods

Methods that should specifically not be mocked

Methods that should specifically not be mocked

This is currently populated with stuff we don't know how to deal with, should really be somewhere else

# array()
protected array $whiteListedMethods

If not empty, only these methods will be mocked

If not empty, only these methods will be mocked

# array()
protected boolean $instanceMock

An instance mock is where we override the original class before it's autoloaded

An instance mock is where we override the original class before it's autoloaded

# false
protected array $parameterOverrides

Param overrides

Param overrides

# array()
protected $allMethods

Instance cache of all methods

Instance cache of all methods

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