404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.142.135.214: ~ $
.. index::
    single: Mocking; Magic Methods

PHP Magic Methods
=================

PHP magic methods which are prefixed with a double underscore, e.g.
``__set()``, pose a particular problem in mocking and unit testing in general.
It is strongly recommended that unit tests and mock objects do not directly
refer to magic methods. Instead, refer only to the virtual methods and
properties these magic methods simulate.

Following this piece of advice will ensure we are testing the real API of
classes and also ensures there is no conflict should Mockery override these
magic methods, which it will inevitably do in order to support its role in
intercepting method calls and properties.

Filemanager

Name Type Size Permission Actions
alternative_should_receive_syntax.rst File 2.41 KB 0644
argument_validation.rst File 10.82 KB 0644
creating_test_doubles.rst File 14.55 KB 0644
demeter_chains.rst File 1.64 KB 0644
expectations.rst File 16.09 KB 0644
final_methods_classes.rst File 1.35 KB 0644
index.rst File 422 B 0644
instance_mocking.rst File 827 B 0644
magic_methods.rst File 703 B 0644
map.rst.inc File 564 B 0644
partial_mocks.rst File 4.29 KB 0644
pass_by_reference_behaviours.rst File 4.35 KB 0644
phpunit_integration.rst File 4.88 KB 0644
protected_methods.rst File 694 B 0644
public_properties.rst File 841 B 0644
public_static_properties.rst File 716 B 0644
spies.rst File 4.78 KB 0644