public static function tearDownAfterClass() { Magento_Profiler::reset(); }
protected function tearDown() { Magento_Profiler::reset(); }
/** * @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)); }
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'); }