public function testNotify() { $i = 0; $mutex = new CASMutex(); $mutex->synchronized(function () use($mutex, &$i) { $i++; $mutex->notify(); }); $this->assertEquals(1, $i); }