protected function expectCallableOnceWith($value) { $mock = $this->createCallableMock(); $mock->expects($this->once())->method('__invoke')->with($value); return $mock; }