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
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: protected_methods.rst
.. index:: single: Mocking; Protected Methods Mocking Protected Methods ========================= By default, Mockery does not allow mocking protected methods. We do not recommend mocking protected methods, but there are cases when there is no other solution. For those cases we have the ``shouldAllowMockingProtectedMethods()`` method. It instructs Mockery to specifically allow mocking of protected methods, for that one class only: .. code-block:: php class MyClass { protected function foo() { } } $mock = \Mockery::mock('MyClass') ->shouldAllowMockingProtectedMethods(); $mock->shouldReceive('foo');
Simpan