Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
.. index::
2
    single: Cookbook; Detecting Mock Objects
3
 
4
Detecting Mock Objects
5
======================
6
 
7
Users may find it useful to check whether a given object is a real object or a
8
simulated Mock Object. All Mockery mocks implement the
9
``\Mockery\MockInterface`` interface which can be used in a type check.
10
 
11
.. code-block:: php
12
 
13
    assert($mightBeMocked instanceof \Mockery\MockInterface);