Closed elliotchance closed 9 years ago
This works:
$calculatorMock = $this->mock('\Calculator') ->stub('add')->with(3, 5)->andReturn(8) ->with(2, 7)->andReturn(9) ->done();
This doesn't:
$calculatorMock = $this->mock('\Calculator') ->stub('add')->with(3, 5)->andReturn(8) ->stub('add')->with(2, 7)->andReturn(9) ->done();
The second stub('add') overrides the first. It should act the same in both cases.
stub('add')
Cannot reproduce.
The inspection completed: No new issues
This works:
This doesn't:
The second
stub('add')
overrides the first. It should act the same in both cases.