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

Public Member Functions

 testRegisterFileProfiler ()
 
 testRegisterBambooProfiler ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Protected Attributes

 $_object
 
 $_driver
 

Detailed Description

Definition at line 12 of file ProfilerTest.php.

Member Function Documentation

◆ setUp()

setUp ( )
protected

Definition at line 24 of file ProfilerTest.php.

25  {
26  $this->expectOutputString('');
27  $this->_driver =
28  $this->createPartialMock(\Magento\Framework\Profiler\Driver\Standard::class, ['registerOutput']);
29  $this->_object = new \Magento\TestFramework\Bootstrap\Profiler($this->_driver);
30  }

◆ tearDown()

tearDown ( )
protected

Definition at line 32 of file ProfilerTest.php.

33  {
34  $this->_driver = null;
35  $this->_object = null;
36  }

◆ testRegisterBambooProfiler()

testRegisterBambooProfiler ( )

Definition at line 50 of file ProfilerTest.php.

51  {
52  $this->_driver->expects(
53  $this->once()
54  )->method(
55  'registerOutput'
56  )->with(
57  $this->isInstanceOf(\Magento\TestFramework\Profiler\OutputBamboo::class)
58  );
59  $this->_object->registerBambooProfiler('php://output', __DIR__ . '/_files/metrics.php');
60  }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60

◆ testRegisterFileProfiler()

testRegisterFileProfiler ( )

Definition at line 38 of file ProfilerTest.php.

39  {
40  $this->_driver->expects(
41  $this->once()
42  )->method(
43  'registerOutput'
44  )->with(
45  $this->isInstanceOf(\Magento\Framework\Profiler\Driver\Standard\Output\Csvfile::class)
46  );
47  $this->_object->registerFileProfiler('php://output');
48  }

Field Documentation

◆ $_driver

$_driver
protected

Definition at line 22 of file ProfilerTest.php.

◆ $_object

$_object
protected

Definition at line 17 of file ProfilerTest.php.


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