public function testAdd() { $mock = $this->_getDriverMock(); Magento_Profiler::add($mock); $this->assertTrue(Magento_Profiler::isEnabled()); $expected = array($mock); $this->assertAttributeEquals($expected, '_drivers', 'Magento_Profiler'); }
/** * Display collected statistics with registered outputs */ public function display() { if (Magento_Profiler::isEnabled()) { foreach ($this->_outputs as $output) { $output->display($this->_stat); } } }