Exemplo n.º 1
0
 /**
  * Test clear method
  */
 public function testClear()
 {
     $this->_stat->start('timer1', 1, 20, 10);
     $this->_stat->start('timer2', 2, 20, 10);
     $this->_stat->start('timer3', 3, 20, 10);
     $this->assertAttributeCount(3, '_timers', $this->_stat);
     $this->_stat->clear('timer1');
     $this->assertAttributeCount(2, '_timers', $this->_stat);
     $this->_stat->clear();
     $this->assertAttributeEmpty('_timers', $this->_stat);
 }
Exemplo n.º 2
0
 /**
  * Clear collected statistics for specified timer or for whole profiler if timer id is omitted
  *
  * @param string|null $timerId
  * @return void
  */
 public function clear($timerId = null)
 {
     $this->_stat->clear($timerId);
 }