Ejemplo n.º 1
0
 public function test_getNumberOfAcquiredLocks_shouldReturnNumberOfLocks()
 {
     $this->assertNumberOfLocksEquals(0);
     $this->lock->acquireLock(0);
     $this->assertNumberOfLocksEquals(1);
     $this->lock->acquireLock(4);
     $this->lock->acquireLock(5);
     $this->assertNumberOfLocksEquals(3);
     $this->lock->unlock();
     $this->assertNumberOfLocksEquals(2);
 }
Ejemplo n.º 2
0
 public function unlock()
 {
     $this->lock->unlock();
 }