/** * 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(); }
/** * Register profiler with Bamboo-friendly output format * * @param string $profilerOutputFile * @param string $profilerMetricsFile */ public function registerBambooProfiler($profilerOutputFile, $profilerMetricsFile) { $this->_registerDriver(); $this->_driver->registerOutput(new \Magento\TestFramework\Profiler\OutputBamboo(['filePath' => $profilerOutputFile, 'metrics' => require $profilerMetricsFile])); }
public function testRegisterBambooProfiler() { $this->_driver->expects($this->once())->method('registerOutput')->with($this->isInstanceOf('Magento\\TestFramework\\Profiler\\OutputBamboo')); $this->_object->registerBambooProfiler('php://output', __DIR__ . '/_files/metrics.php'); }