Returning different values in a specific order from your mocked method in PHPUnit

Code
<?php

class ConsecutiveTest extends PHPUnit_Framework_TestCase
{
    public function 
testCounterCall()
    {
        
$counter $this->createMock(Counter::CLASS);
        
$counter->expects($this->atLeastOnce())
            ->
method('increment')
            ->
will($this->onConsecutiveCalls(123));
        
        
$this->assertEquals(1$counter->increment());
        
$this->assertEquals(2$counter->increment());
        
$this->assertEquals(3$counter->increment());
        
// Any further invocation returns null
        
$this->assertEquals(null$counter->increment());
    }
}

class 
Counter
{
    private 
$count 0;
    
    public function 
increment()
    {
        return ++
$this->count;
    }
}
Result
Time: 60 ms, Memory: 2.00MB

OK (1 test, 0 assertions)
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6