Exemplo n.º 1
0
 public static function tearDownAfterClass()
 {
     Magento_Profiler::reset();
 }
Exemplo n.º 2
0
 protected function tearDown()
 {
     Magento_Profiler::reset();
 }
Exemplo n.º 3
0
 /**
  * @dataProvider resetTimerDataProvider
  */
 public function testResetTimer($timerId, $fetchKey)
 {
     $this->assertNotEmpty(Magento_Profiler::fetch($timerId, $fetchKey));
     Magento_Profiler::reset($timerId);
     $this->assertEmpty(Magento_Profiler::fetch($timerId, $fetchKey));
 }
Exemplo n.º 4
0
 public function testResetProfiler()
 {
     $driver = $this->_getDriverMock();
     $driver->expects($this->once())->method('clear')->with(null);
     Magento_Profiler::add($driver);
     Magento_Profiler::reset();
     $this->assertAttributeEquals(array(), '_currentPath', 'Magento_Profiler');
     $this->assertAttributeEquals(array(), '_tagFilters', 'Magento_Profiler');
     $this->assertAttributeEquals(array(), '_defaultTags', 'Magento_Profiler');
     $this->assertAttributeEquals(array(), '_drivers', 'Magento_Profiler');
     $this->assertAttributeEquals(false, '_hasTagFilters', 'Magento_Profiler');
     $this->assertAttributeEquals(0, '_pathCount', 'Magento_Profiler');
     $this->assertAttributeEquals(array(), '_pathIndex', 'Magento_Profiler');
 }