public function testSynchronizedDelegates(callable $mutexFactory) { $mutex = call_user_func($mutexFactory); $result = $mutex->synchronized(function () { return "test"; }); $this->assertEquals("test", $result); }