예제 #1
0
 /**
  * Sets up fixture
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->fixture = new RateLimiting(new Rate(self::RATE, $this->unit()), self::$clock);
 }
예제 #2
0
 /**
  * Sets up fixture
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->fixture = new RateLimiting(10, self::$clock);
 }
예제 #3
0
 /**
  * Constructor
  *
  * @param string $name
  * @param int $rate Defaults to 1
  */
 public function __construct($name, $rate = 1)
 {
     parent::__construct($name);
     $this->rate = (int) $rate;
 }