title: PHPUnit fatal error call to undefined method on mock
body: <p>I want to test that a method on an object is called. I want to do this by making a mock of <code>Object</code>, rather than any specific class. But the following code throws a fatal error:</p>
  
  <pre><code>class MyTest extends PHPUnit_Framework_TestCase
  {
      public function testSomeMethodIsCalled()
      {
          $mock = $this-&gt;getMock('Object');
          $mock-&gt;expects($this-&gt;once())
                  -&gt;method('someMethod');
          $mock-&gt;someMethod();
      }
  }
  </code></pre>
  
  <p>The above dies with an error:</p>
  
  <pre><code>Fatal error: Call to undefined method Mock_Object_204ac105::someMethod()
  </code></pre>
  
  <p>I'm sure there was a way to do this, without having to write a class that actually has a <code>someMethod()</code> method?</p>