Server IP : 162.213.251.212 / Your IP : 3.147.82.108 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/allssztx/www/easybuyer/vendor/mockery/mockery/docs/reference/ |
Upload File : |
.. index:: single: Mocking; Public Properties Mocking Public Properties ========================= Mockery allows us to mock properties in several ways. One way is that we can set a public property and its value on any mock object. The second is that we can use the expectation methods ``set()`` and ``andSet()`` to set property values if that expectation is ever met. You can read more about :ref:`expectations-setting-public-properties`. .. note:: In general, Mockery does not support mocking any magic methods since these are generally not considered a public API (and besides it is a bit difficult to differentiate them when you badly need them for mocking!). So please mock virtual properties (those relying on ``__get()`` and ``__set()``) as if they were actually declared on the class.