Class MockBuilder
Fluent API mock builder.
Example:
namespace foo; use phpmock\MockBuilder; use phpmock\functions\FixedValueFunction; $builder = new MockBuilder(); $builder->setNamespace(__NAMESPACE__) ->setName("time") ->setFunctionProvider(new FixedValueFunction(1417011228)); $mock = $builder->build(); // The mock is not enabled yet. assert (time() != 1417011228); $mock->enable(); assert (time() == 1417011228); // The mock is disabled and PHP's built-in time() is called. $mock->disable(); assert (time() != 1417011228);
Namespace: phpmock
License: WTFPL
Author: Markus Malkusch markus@malkusch.de
See:
Link: Donations
Located at MockBuilder.php
License: WTFPL
Author: Markus Malkusch markus@malkusch.de
See:
phpmock\Mock
Link: Donations
Located at MockBuilder.php
public
|
|
public
|
|
public
|
|
public
|
|
public
|