\Shmock

Namespaces

ClassBuilder

Traits

Shmockers Include this in instances of PHPUnit_Framework_TestCase to make Shmock easily accessible

Classes

Policy Shmock policies describe rules for how mocks can be constructed. Extend this abstract class and intercept what you need. Failures in each of these methods should trigger an Exception.
PHPUnitSpec A spec is used during the build phase of mock creation to configure the expectations on a single invocation of a method on a mock.
Shmock The Shmock\Shmock class is the entry point to the fluent Shmock interface. You may use this class directly to create mocks. Alternatively, use the Shmockers trait to include shorthand versions of create() and create_class() in your test cases.
Shmock_Closure_Invoker This is used to support the will() response to mocking a method.
Shmock_Exception It is recommended for Shmock policy implementors to use the \Shmock\Shmock_Exception type to signal policy infringements.
Instance
InstanceClass This class is only used when in the context of mocked instance and the shmock_class function is used.
StaticClass StaticClass is the static equivalent of Instance. StaticClass instances can be used to build a mocked class.