title: PHPUnit Stub does not return needed value
body: <p>I have the following unit test but I don't get back the needed values. Maybe I don't understand how this works correctly.</p>
  
  <pre><code>class TestClass
  {
      public function getData()
      {
          $id = 1123;
          return $id;
      }
  }
  
  class Test_ClassTesting extends PHPUnit_Framework_TestCase
  {
  
      public function test_addData()
      {
          $stub = $this-&gt;getMock('TestClass');
  
  
          $stub
              -&gt;expects($this-&gt;any())
              -&gt;method('getData')
              -&gt;will($this-&gt;returnValue('what_should_i_put_here_to_get id from TESTCLASS'));
  
  
          $y = $stub-&gt;getData();
  
      }
  }
  </code></pre>