HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: /home/mmickelson/spilicensing/vendor/mockery/mockery/docs/reference/public_properties.rst
.. index::
    single: Mocking; Public Properties

Mocking Public Properties
=========================

Mockery allows you to mock properties in several ways. The simplest is that
you can simply set a public property and value on any mock object. The second
is that you can use the expectation methods ``set()`` and ``andSet()`` to set
property values if that expectation is ever met.

You should note that, in general, Mockery does not support mocking any magic
methods since these are generally not considered a public API (and besides
they are a PITA to differentiate 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.