Beispiel #1
0
 public function testStatCanBeDecrementedByX()
 {
     Resque_Stat::incr('test_decrX', 22);
     Resque_Stat::decr('test_decrX', 11);
     $this->assertEquals(11, $this->redis->get('resque:stat:test_decrX'));
 }
 /**
  * Decrement the value of the specified statistic by a certain amount (default is 1)
  *
  * @param string $stat The name of the statistic to decrement.
  * @param int $by The amount to decrement the statistic by.
  * @return boolean True if successful, false if not.
  */
 public static function decr($stat = self::KEYNAME, $by = 1)
 {
     return parent::decr($stat, $by);
 }