ptrofimov/xpmock — pull request #7 by michaelmoussa (2014-03-21 15:34:07+00:00)
Title: Fix for "with / expects" mock case not working

Per the README docs, I should be able to do:

`->getNumber([1,2,3], $this->once())`

as a shorthand for:

`$mock->expects($this->once())->method('getNumber')->with(1,2,3)->will($this->returnValue(null))`

However, this does not work correctly. See bc84bbd0b5946926a41c0ecd0a3f07d40723cc1a for a demonstration. It sets the "will" return value to `[1, 2, 3]` instead of the expected "with".

This PR will fix the `with / expects` scenario without breaking any existing tests.