コード例 #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;
 }