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

  • ComposerAutoloaderInitf6a6b7ce79fd694e08993c94c595cc5f
  • Mockery
  • Starship
  • StarshipTest

Interfaces

  • SessionHandlerInterface

Functions

  • composerRequiref6a6b7ce79fd694e08993c94c595cc5f
  • Overview
  • Namespace
  • Class
  • Tree

Class Mockery

Package: Mockery
Copyright: Copyright (c) 2010-2014 Pádraic Brady (http://blog.astrumfutura.com)
License: New BSD License
Located at Mockery.php
Methods summary
public static Mockery\MockInterface
# mock( )

Static shortcut to \Mockery\Container::mock().

Static shortcut to \Mockery\Container::mock().

Returns

Mockery\MockInterface
public static Mockery\MockInterface
# spy( )

Returns

Mockery\MockInterface
public static Mockery\MockInterface
# instanceMock( )

Returns

Mockery\MockInterface
public static Mockery\MockInterface
# namedMock( )

Static shortcut to \Mockery\Container::mock(), first argument names the mock.

Static shortcut to \Mockery\Container::mock(), first argument names the mock.

Returns

Mockery\MockInterface
public static Mockery\MockInterface
# self( )

Static shortcut to \Mockery\Container::self().

Static shortcut to \Mockery\Container::self().

Returns

Mockery\MockInterface

Throws

LogicException
public static
# close( )

Static shortcut to closing up and verifying all mocks in the global container, and resetting the container static variable to null.

Static shortcut to closing up and verifying all mocks in the global container, and resetting the container static variable to null.

public static Mockery\Mock
# fetchMock( $name )

Static fetching of a mock associated with a name or explicit class poser.

Static fetching of a mock associated with a name or explicit class poser.

Parameters

$name

Returns

Mockery\Mock
public static
# getContainer( )

Get the container.

Get the container.

public static
# setGenerator( Mockery\Generator\Generator $generator )

Parameters

$generator
public static
# getGenerator( )
public static
# getDefaultGenerator( )
public static
# setLoader( Mockery\Loader\Loader $loader )

Parameters

$loader
public static Mockery\Loader\Loader
# getLoader( )

Returns

Mockery\Loader\Loader
public static Mockery\Loader\EvalLoader
# getDefaultLoader( )

Returns

Mockery\Loader\EvalLoader
public static Mockery\Container
# setContainer( Mockery\Container $container )

Set the container.

Set the container.

Parameters

$container

Returns

Mockery\Container
public static
# resetContainer( )

Reset the container to null.

Reset the container to null.

public static Mockery\Matcher\Any
# any( )

Return instance of ANY matcher.

Return instance of ANY matcher.

Returns

Mockery\Matcher\Any
public static Mockery\Matcher\Type
# type( $expected )

Return instance of TYPE matcher.

Return instance of TYPE matcher.

Parameters

$expected

Returns

Mockery\Matcher\Type
public static Mockery\Matcher\Ducktype
# ducktype( )

Return instance of DUCKTYPE matcher.

Return instance of DUCKTYPE matcher.

Returns

Mockery\Matcher\Ducktype
public static Mockery\Matcher\Subset
# subset( array $part )

Return instance of SUBSET matcher.

Return instance of SUBSET matcher.

Parameters

$part

Returns

Mockery\Matcher\Subset
public static Mockery\Matcher\Contains
# contains( )

Return instance of CONTAINS matcher.

Return instance of CONTAINS matcher.

Returns

Mockery\Matcher\Contains
public static Mockery\Matcher\HasKey
# hasKey( $key )

Return instance of HASKEY matcher.

Return instance of HASKEY matcher.

Parameters

$key

Returns

Mockery\Matcher\HasKey
public static Mockery\Matcher\HasValue
# hasValue( $val )

Return instance of HASVALUE matcher.

Return instance of HASVALUE matcher.

Parameters

$val

Returns

Mockery\Matcher\HasValue
public static Mockery\Matcher\Closure
# on( $closure )

Return instance of CLOSURE matcher.

Return instance of CLOSURE matcher.

Parameters

$closure

Returns

Mockery\Matcher\Closure
public static Mockery\Matcher\MustBe
# mustBe( $expected )

Return instance of MUSTBE matcher.

Return instance of MUSTBE matcher.

Parameters

$expected

Returns

Mockery\Matcher\MustBe
public static Mockery\Matcher\Not
# not( $expected )

Return instance of NOT matcher.

Return instance of NOT matcher.

Parameters

$expected

Returns

Mockery\Matcher\Not
public static Mockery\Matcher\AnyOf
# anyOf( )

Return instance of ANYOF matcher.

Return instance of ANYOF matcher.

Returns

Mockery\Matcher\AnyOf
public static Mockery\Matcher\NotAnyOf
# notAnyOf( )

Return instance of NOTANYOF matcher.

Return instance of NOTANYOF matcher.

Returns

Mockery\Matcher\NotAnyOf
public static
# getConfiguration( )

Get the global configuration container.

Get the global configuration container.

public static string
# formatArgs( string $method, array $arguments = null )

Utility method to format method name and arguments into a string.

Utility method to format method name and arguments into a string.

Parameters

$method
$arguments

Returns

string
public static string
# formatObjects( array $objects = null )

Utility function to format objects to printable arrays.

Utility function to format objects to printable arrays.

Parameters

$objects

Returns

string
public static Mockery\CompositeExpectation
# parseShouldReturnArgs( Mockery\MockInterface $mock, array $args, callable $add )

Utility function to parse shouldReceive() arguments and generate expectations from such as needed.

Utility function to parse shouldReceive() arguments and generate expectations from such as needed.

Parameters

$mock
$args
$add

Returns

Mockery\CompositeExpectation
protected static Mockery\ExpectationDirector
# buildDemeterChain( Mockery\MockInterface $mock, string $arg, callable $add )

Sets up expectations on the members of the CompositeExpectation and builds up any demeter chain that was passed to shouldReceive.

Sets up expectations on the members of the CompositeExpectation and builds up any demeter chain that was passed to shouldReceive.

Parameters

$mock
$arg
$add

Returns

Mockery\ExpectationDirector

Throws

Mockery\Exception
Constants summary
string BLOCKS
# 'Mockery_Forward_Blocks'
Properties summary
protected static Mockery\Container $_container

Global container to hold all mocks for the current unit test running.

Global container to hold all mocks for the current unit test running.

# null
protected static Mockery\Configuration $_config

Global configuration handler containing configuration options.

Global configuration handler containing configuration options.

# null
protected static Mockery\Generator\Generator $_generator
#
protected static Mockery\Loader\Loader $_loader
#
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen