Esempio n. 1
0
 /**
  * Test display method
  *
  * @dataProvider displayDataProvider
  * @param string $statFile
  * @param string $expectedFile
  * @param string $delimiter
  * @param string $enclosure
  */
 public function testDisplay($statFile, $expectedFile, $delimiter = ',', $enclosure = '"')
 {
     $this->_output = new \Magento\Framework\Profiler\Driver\Standard\Output\Csvfile(['filePath' => $this->_outputFile, 'delimiter' => $delimiter, 'enclosure' => $enclosure]);
     $stat = (include $statFile);
     $this->_output->display($stat);
     $this->assertFileEquals($expectedFile, $this->_outputFile);
 }
Esempio n. 2
0
 /**
  * Constructor
  *
  * @param array|null $config
  */
 public function __construct(array $config = null)
 {
     parent::__construct($config);
     $this->_metrics = isset($config['metrics']) ? (array) $config['metrics'] : [];
 }