Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
OutputBambooTest Class Reference
Inheritance diagram for OutputBambooTest:

Public Member Functions

 testDisplay ()
 

Static Public Member Functions

static setUpBeforeClass ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $_output
 

Detailed Description

Test class for \Magento\TestFramework\Profiler\OutputBamboo.

Definition at line 12 of file OutputBambooTest.php.

Member Function Documentation

◆ setUp()

setUp ( )
protected

Reset collected data and prescribe to pass stream data through the collector filter

http://php.net/manual/en/wrappers.php.php

Definition at line 27 of file OutputBambooTest.php.

28  {
30 
34  $this->_output = new \Magento\TestFramework\Profiler\OutputBamboo(
35  [
36  'filePath' => 'php://filter/write=dataCollectorFilter/resource=php://memory',
37  'metrics' => ['sample metric (ms)' => ['profiler_key_for_sample_metric']],
38  ]
39  );
40  }

◆ setUpBeforeClass()

static setUpBeforeClass ( )
static

Definition at line 19 of file OutputBambooTest.php.

20  {
21  stream_filter_register('dataCollectorFilter', \Magento\Test\Profiler\OutputBambooTestFilter::class);
22  }

◆ testDisplay()

testDisplay ( )

Definition at line 42 of file OutputBambooTest.php.

43  {
44  $this->_output->display(new \Magento\Framework\Profiler\Driver\Standard\Stat());
45  \Magento\Test\Profiler\OutputBambooTestFilter::assertCollectedData("Timestamp,\"sample metric (ms)\"\n%d,%d");
46  }

Field Documentation

◆ $_output

$_output
protected

Definition at line 17 of file OutputBambooTest.php.


The documentation for this class was generated from the following file: