Пример #1
0
 /**
  * Constructor
  *
  * @param array|null $config
  */
 public function __construct(array $config = null)
 {
     parent::__construct($config);
     $this->_filePath = $this->_parseFilePath($config);
     $this->_delimiter = isset($config['delimiter']) ? $config['delimiter'] : ',';
     $this->_enclosure = isset($config['enclosure']) ? $config['enclosure'] : '"';
 }
Пример #2
0
 /**
  * Test _getTimerIds method
  */
 public function testGetTimerIds()
 {
     $this->_output->setFilterPattern('/filter pattern/');
     $mockStat = $this->getMock('Magento_Profiler_Driver_Standard_Stat');
     $expectedTimerIds = array('test');
     $mockStat->expects($this->once())->method('getFilteredTimerIds')->with($this->_output->getThresholds(), $this->_output->getFilterPattern())->will($this->returnValue($expectedTimerIds));
     $method = new ReflectionMethod($this->_output, '_getTimerIds');
     $method->setAccessible(true);
     $this->assertEquals($expectedTimerIds, $method->invoke($this->_output, $mockStat));
 }
Пример #3
0
 /**
  * Start output buffering
  *
  * @param array $config
  */
 public function __construct(array $config = null)
 {
     parent::__construct($config);
     ob_start();
 }