You Are Here: Home Documentation API Reference createStub

Enhance PHP Unit Testing And Mocking Framework improve the quality

createStub

\Enhance\StubFactory::createStub($className);

Creates a new mock object.

Parameters

String $className

The name of the class to be substituted with a stub object.

Example Usage

\Enhance\StubFactory::createStub('CustomerRepository');

See Mocks And Stubs .