Blame | Letzte Änderung | Log anzeigen | RSS feed
.. index::single: Mocking; Magic MethodsPHP 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 directlyrefer to magic methods. Instead, refer only to the virtual methods andproperties these magic methods simulate.Following this piece of advice will ensure we are testing the real API ofclasses and also ensures there is no conflict should Mockery override thesemagic methods, which it will inevitably do in order to support its role inintercepting method calls and properties.