File Manager Lite
Dir:
/home/codewavebd/public_html/vendor/mockery/mockery/docs/reference
Upload
[..]
alternative_should_receive_syntax.rst (2.33 KB)
Edit
Rename
Del
argument_validation.rst (10.49 KB)
Edit
Rename
Del
creating_test_doubles.rst (14.12 KB)
Edit
Rename
Del
demeter_chains.rst (1.6 KB)
Edit
Rename
Del
expectations.rst (15.57 KB)
Edit
Rename
Del
index.rst (421 B)
Edit
Rename
Del
instance_mocking.rst (805 B)
Edit
Rename
Del
magic_methods.rst (687 B)
Edit
Rename
Del
map.rst.inc (550 B)
Edit
Rename
Del
partial_mocks.rst (4.19 KB)
Edit
Rename
Del
pass_by_reference_behaviours.rst (4.22 KB)
Edit
Rename
Del
protected_methods.rst (668 B)
Edit
Rename
Del
public_properties.rst (821 B)
Edit
Rename
Del
public_static_properties.rst (701 B)
Edit
Rename
Del
spies.rst (4.63 KB)
Edit
Rename
Del
Edit: instance_mocking.rst
.. 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.
Simpan