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