title: PHPUnit - When is a method counted as 'executed'/'called' by invocation count?
body: <p>I got a problem with my PHPUnit test. I have a method like:</p>
  
  <pre><code>public function bla() 
  {
      $this-&gt;blub();
  }
  </code></pre>
  
  <p>$_testObject is a mocked instance of Foo, like this:</p>
  
  <pre><code>public function setUp()
  {
      $this-&gt;_testObject = $this-&gt;getMockBuilder('Foo')
                                -&gt;setMethods(array('blub'))
                                -&gt;getMock();
  }
  </code></pre>
  
  <p>My test method is like:</p>
  
  <pre><code>/**
   * @test
   * @covers Foo::bla
   */
  public function shouldCallBlubOnce() 
  {
      $this-&gt;_testObject-&gt;expects($this-&gt;once())
                        -&gt;method('blub');
  
      //forgot this one :D
      $this-&gt;_testObject-&gt;bla();
  }
  </code></pre>
  
  <p>Result of this test delivers:</p>
  
  <pre><code>PHPUnit_Framework_ExpectationFailedException : 
  Expectation failed for method name is equal to &lt;string:blub&gt; when invoked 1 time(s).
  Method was expected to be called 1 times, actually called 0 times.
  </code></pre>
  
  <p>Thanks in advance. :)</p>