expects() – Sets how many times you expect a method to be called:
$mock = $this->getMock('nameOfTheClass', array('firstMethod','secondMethod','thirdMethod'));
$mock->expects($this->once())
->method('firstMethod')
->will($this->returnValue('value'));
$mock->expects($this->once())
->method('secondMethod')
->will($this->returnValue('value'));
$mock->expects($this->once())
->method('thirdMethod')
->will($this->returnValue('value'));
If you know, that method is called once use $this->once() in expects(), otherwise use $this->any()
see:
PHPUnit mock with multiple expects() calls
https://phpunit.de/manual/current/en/test-doubles.html#test-doubles.stubs