/home/techb158/ileadtechnology.com/vendor/mockery/mockery/docs/reference
NameSizeModeActions
alternative_should_receive_syntax.rst23810644editdlrm
argument_validation.rst107430644editdlrm
creating_test_doubles.rst144610644editdlrm
demeter_chains.rst16390644editdlrm
expectations.rst151260644editdlrm
final_methods_classes.rst13190644editdlrm
index.rst4000644editdlrm
instance_mocking.rst8050644editdlrm
magic_methods.rst6870644editdlrm
map.rst.inc5500644editdlrm
partial_mocks.rst42860644editdlrm
pass_by_reference_behaviours.rst43220644editdlrm
phpunit_integration.rst50050644editdlrm
protected_methods.rst6680644editdlrm
public_properties.rst8210644editdlrm
public_static_properties.rst7010644editdlrm
spies.rst47370644editdlrm
Edit: /home/techb158/ileadtechnology.com/vendor/mockery/mockery/docs/reference/instance_mocking.rst (805B)
.. index:: single: Mocking; Instance Instance Mocking ================ Instance mocking means that a statement like: .. code-block:: php $obj = new \MyNamespace\Foo; ...will actually generate a mock object. This is done by replacing the real class with an instance mock (similar to an alias mock), as with mocking public methods. The alias will import its expectations from the original mock of that type (note that the original is never verified and should be ignored after its expectations are setup). This lets you intercept instantiation where you can't simply inject a replacement object. As before, this does not prevent a require statement from including the real class and triggering a fatal PHP error. It's intended for use where autoloading is the primary class loading mechanism.