Skip to content
This repository has been archived by the owner on Nov 23, 2022. It is now read-only.

Commit

Permalink
Add an example for verifyCallMethodWith()
Browse files Browse the repository at this point in the history
Fixes #170
  • Loading branch information
mlively committed Feb 23, 2015
1 parent 66bbb54 commit 917912a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/method-verification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,20 @@ You could mock an invocation of the `__call()` method through a userspace call t
If for any reason you need to explicitly verify calls to ``__call()`` then you can use ``Phake::verifyCallMethodWith()``.

.. code-block:: php
class MagicClassTest extends PHPUnit_Framework_TestCase
{
public function testMagicCall()
{
$mock = Phake::mock('MagicClass');
$mock->magicCall(42);
Phake::verifyCallMethodWith('magicCall', array(42))->isCalledOn($mock);
}
}
Verifying Static Methods
========================
Using Phake you can verify polymorphic calls to static methods using ``Phake::verifyStatic()``. It is important to note
Expand Down

0 comments on commit 917912a

Please sign in to comment.