PHP Class phpmock\spy\SpyTest

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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
defineFunction ( $namespace, $functionName )
disableMocks ( )
mockFunction ( $namespace, $functionName, callable $function )

Method Details

defineFunction() protected méthode

protected defineFunction ( $namespace, $functionName )

disableMocks() protected méthode

protected disableMocks ( )

mockFunction() protected méthode

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

provideTestGetInvocations() public méthode

Returns test cases for testGetInvocations().
public provideTestGetInvocations ( ) : array
Résultat array Test cases for testGetInvocations.

testDefaultFunction() public méthode

Tests the default function.
public testDefaultFunction ( )

testException() public méthode

An exception should still be recorded.
public testException ( )

testGetInvocations() public méthode

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

testNoException() public méthode

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