title: PHPUnit Fail When Method Being Stubbed Does Not Originally Exist
body: <p>Is there a way to make PHPUnit throw an exception if a method being stubbed does not originally exist in the class being stubbed?</p>
  
  <p>Here's a crude example:</p>
  
  <pre><code>class User {
  
    function getId() { ... }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>class LoginTest extends PHPUnit_Framework_TestCase {
  
    function testLogin() {
      ...
      $userMock = $this-&gt;getMockBuilder('User')
                       -&gt;setMethods(['getID']) // getId is misspelled; error should occur
                       -&gt;getMock();
      ...
    }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>class Login {
  
    function login($user) {
      ...
      $id = $user-&gt;getID(); // tests will pass even though this is misspelled
      ...
    }
  }
  </code></pre>