public function testMockArgumentsPassedByReference2() {
$foo = $this
->getMockBuilder('MethodCallbackByReference')
->disableOriginalConstructor()
->disableArgumentCloning()
->getMock();
$foo
->expects($this
->any())
->method('bar')
->will($this
->returnCallback(function ($a, &$b, $c) {
$b = 1;
}));
$a = $b = $c = 0;
$foo
->bar($a, $b, $c);
$this
->assertEquals(1, $b);
}