PHP Class phpmock\spy\SpyTest

See also: Spy
Author: Markus Malkusch ([email protected])
Inheritance: extends phpmock\AbstractMockTest
Datei anzeigen Open project: php-mock/php-mock

Public Methods

Method Description
provideTestGetInvocations ( ) : array Returns test cases for testGetInvocations().
testDefaultFunction ( ) Tests the default function.
testException ( ) An exception should still be recorded.
testGetInvocations ( array $expected, string $name, callable $invocations ) Tests spying.
testNoException ( ) Test the invocation of a none exception call.

Protected Methods

Method Description
defineFunction ( $namespace, $functionName )
disableMocks ( )
mockFunction ( $namespace, $functionName, callable $function )

Method Details

defineFunction() protected method

protected defineFunction ( $namespace, $functionName )

disableMocks() protected method

protected disableMocks ( )

mockFunction() protected method

protected mockFunction ( $namespace, $functionName, callable $function )
$function callable

provideTestGetInvocations() public method

Returns test cases for testGetInvocations().
public provideTestGetInvocations ( ) : array
return array Test cases for testGetInvocations.

testDefaultFunction() public method

Tests the default function.
public testDefaultFunction ( )

testException() public method

An exception should still be recorded.
public testException ( )

testGetInvocations() public method

Tests spying.
public testGetInvocations ( array $expected, string $name, callable $invocations )
$expected array
$name string
$invocations callable

testNoException() public method

Test the invocation of a none exception call.
public testNoException ( )