404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.145.35.4: ~ $
.. 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.33 KB 0644
argument_validation.rst File 10.49 KB 0644
creating_test_doubles.rst File 14.12 KB 0644
demeter_chains.rst File 1.6 KB 0644
expectations.rst File 15.57 KB 0644
final_methods_classes.rst File 1.32 KB 0644
index.rst File 400 B 0644
instance_mocking.rst File 805 B 0644
magic_methods.rst File 687 B 0644
map.rst.inc File 550 B 0644
partial_mocks.rst File 4.19 KB 0644
pass_by_reference_behaviours.rst File 4.22 KB 0644
phpunit_integration.rst File 4.74 KB 0644
protected_methods.rst File 668 B 0644
public_properties.rst File 821 B 0644
public_static_properties.rst File 701 B 0644
spies.rst File 4.63 KB 0644