When I create a new mock I need to call the expects method. What exactly it does? What about its arguments?
$todoListMock = $this->getMock('\Model\Todo_List');
$todoListMock->expects($this->any())
->method('getItems')
->will($this->returnValue(array($itemMock)));
I can't find the reason anywhere (I've tried docs). I've read the sources but I can't understand it.