PHP Class phpmock\environment\MockEnvironment

Author: Markus Malkusch ([email protected])
Inheritance: implements phpmock\Deactivatable
Mostra file Open project: php-mock/php-mock Class Usage Examples

Public Methods

Method Description
__construct ( array $mocks = [] ) Sets the mocks for this environment.
addMock ( Mock $mock ) Adds a mock to this environment.
define ( ) Define all mocks in this environment.
disable ( ) Disable all mocks in this environment.
enable ( ) Enable all mocks in this environment.

Method Details

__construct() public method

Sets the mocks for this environment.
public __construct ( array $mocks = [] )
$mocks array The mocks for this environment.

addMock() public method

Adds a mock to this environment.
public addMock ( Mock $mock )
$mock phpmock\Mock Mock.

define() public method

Define all mocks in this environment.
See also: phpmock\Mock::define()
public define ( )

disable() public method

Disable all mocks in this environment.
public disable ( )

enable() public method

Enable all mocks in this environment.
public enable ( )