title: PHPUnit multiple mocked methods of the same name
body: <p>I'm wondering how to go about testing this. Say I have a getter method, and I change the value in the process of a method. Here's a simple example:</p>
  
  <pre><code>public function foo($model)
  {
    var_dump($model-&gt;state());
    $model-&gt;state('saved');
    var_dump($model-&gt;state());
  }
  </code></pre>
  
  <p>I mock the model like so:</p>
  
  <pre><code>$model = $this-&gt;getMock('Model');
  $model-&gt;expects($this-&gt;any))
    -&gt;method('state')
    -&gt;will($this-&gt;returnValue('new'));
  </code></pre>
  
  <p>How should I setup the mock so that the second call returns a different value (saved)?</p>