PHP Class phpmock\MockDefiningOrderTest

See also: Mock
Author: Markus Malkusch ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: php-mock/php-mock

Public Methods

Method Description
testDefineBeforeFirstCallRestriction ( ) Tests the restriction of Bug #68541.
testDefiningAfterCallingQualified ( ) Tests defining the mock after calling the qualified function name.
testDefiningAfterCallingUnqualified ( ) Tests defining the mock after calling the unqualified function name.

Protected Methods

Method Description
tearDown ( )

Private Methods

Method Description
escapeshellcmd ( string $command ) : string Returns the built-in call to escapeshellcmd().

Method Details

tearDown() protected method

protected tearDown ( )

testDefineBeforeFirstCallRestriction() public method

The fallback policy seems to be static for called class methods. This is documented in Bug #68541. The mock function has to be defined before the first call in a class. When this bug fails, PHP behaviour changed its behaviour and the documentation can be updated.

testDefiningAfterCallingQualified() public method

Tests defining the mock after calling the qualified function name.

testDefiningAfterCallingUnqualified() public method

Tests defining the mock after calling the unqualified function name.