Ejemplo n.º 1
0
 public function test_getAllAcquiredLockKeys_shouldReturnUsedKeysThatAreLocked()
 {
     $this->assertSame(array(), $this->lock->getAllAcquiredLockKeys());
     $this->lock->acquireLock(0);
     $this->assertSame(array('QueuedTrackingLock0'), $this->lock->getAllAcquiredLockKeys());
     $this->lock->acquireLock(4);
     $this->lock->acquireLock(5);
     $locks = $this->lock->getAllAcquiredLockKeys();
     sort($locks);
     $this->assertSame(array('QueuedTrackingLock0', 'QueuedTrackingLock4', 'QueuedTrackingLock5'), $locks);
 }