Esempio n. 1
0
 /**
  * @test
  */
 public function constructorSetsIdToAbsCrc32OfIdStringIfUsingSemaphoreLocking()
 {
     if (!function_exists('sem_get')) {
         $this->markTestSkipped('The system does not support semaphore base locking.');
     }
     $instance = new Locker('999999999', Locker::LOCKING_METHOD_SEMAPHORE);
     $this->assertSame(abs(crc32('999999999')), $instance->getId());
 }