title: Mock private method with PHPUnit
body: <p>I have a question about using PHPUnit to mock a private method inside a class. Let me introduce with an example:</p>
  
  <pre><code>class A {
    public function b() { 
      // some code
      $this-&gt;c(); 
      // some more code
    }
  
    private function c(){ 
      // some code
    }
  }
  </code></pre>
  
  <p>How can I stub the result of the private method to test the <em>some more code</em> part of the public function.</p>
  
  <p>Solved partially reading <a href="https://github.com/sebastianbergmann/phpunit">here</a></p>