title: Determining whether or not an object is a PHPUnit mock
body: <p>I would like to assert that a value/object passed into a PHPUnit test method is a mock that was initialized by getMockBuilder. E.g.:</p>
  
  <pre><code>class Example_Test extends PHPUnit_Framework_TestCase
  {
      ...
  
      public function testMethod(Some_Class $object_mock)
      {
  
          // since methods like "expects" will be used below,
          // this needs to be a mock
          assert('$this-&gt;isMock($object_mock)');
  
          ...
  
          $object_mock-&gt;expects($this-&gt;atLeastOnce())
                      -&gt;method('reallyCoolThingThatMustHappen')
                      -&gt;with(
                          $this-&gt;equalTo('absolutely_necessary_argument')
                      );
  
          ...
  
      }
  }
  </code></pre>
  
  <p>Does anyone know of a method that can be used to assert that <code>$object_mock</code> is a PHPUnit mock? (I know isMock doesn't exist, but I put it there as an example of what I'm trying to do).</p>