You Are Here: Home Documentation API Reference createMock

Enhance PHP Unit Testing And Mocking Framework improve the quality

createMock

\Enhance\MockFactory::createMock($className);

Creates a new mock object.

Parameters

String $className

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

Example Usage

\Enhance\MockFactory::createMock('CustomerRepository');

See Mocks And Stubs .