Example #1
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));
 }