Exemplo n.º 1
0
 public static function setUpBeforeClass()
 {
     self::$_testResourceName = 'testtest_' . mt_rand(1000, 9999) . '_setup';
     \Magento\Framework\Profiler::enable();
 }
Exemplo n.º 2
0
 protected function setUp()
 {
     \Magento\Framework\Profiler::enable();
 }
Exemplo n.º 3
0
 /**
  * Test display method
  */
 public function testDisplayAndRegisterOutput()
 {
     $outputOne = $this->getMock('Magento\\Framework\\Profiler\\Driver\\Standard\\OutputInterface');
     $outputOne->expects($this->once())->method('display')->with($this->_stat);
     $outputTwo = $this->getMock('Magento\\Framework\\Profiler\\Driver\\Standard\\OutputInterface');
     $outputTwo->expects($this->once())->method('display')->with($this->_stat);
     $this->_driver->registerOutput($outputOne);
     $this->_driver->registerOutput($outputTwo);
     \Magento\Framework\Profiler::enable();
     $this->_driver->display();
     \Magento\Framework\Profiler::disable();
     $this->_driver->display();
 }
Exemplo n.º 4
0
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage Timer name must not contain a nesting separator.
  */
 public function testClearException()
 {
     \Magento\Framework\Profiler::enable();
     \Magento\Framework\Profiler::clear('timer ' . \Magento\Framework\Profiler::NESTING_SEPARATOR . ' name');
 }