ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
Monolog\Processor\MemoryPeakUsageProcessorTest Class Reference
+ Inheritance diagram for Monolog\Processor\MemoryPeakUsageProcessorTest:
+ Collaboration diagram for Monolog\Processor\MemoryPeakUsageProcessorTest:

Public Member Functions

 testProcessor ()
 Monolog::__invoke Monolog::formatBytes More...
 
 testProcessorWithoutFormatting ()
 Monolog::__invoke Monolog::formatBytes More...
 

Additional Inherited Members

- Protected Member Functions inherited from Monolog\TestCase
 getRecord ($level=Logger::WARNING, $message='test', $context=array())
 
 getMultipleRecords ()
 
 getIdentityFormatter ()
 

Detailed Description

Definition at line 16 of file MemoryPeakUsageProcessorTest.php.

Member Function Documentation

◆ testProcessor()

Monolog\Processor\MemoryPeakUsageProcessorTest::testProcessor ( )

Monolog::__invoke Monolog::formatBytes

Definition at line 22 of file MemoryPeakUsageProcessorTest.php.

References Monolog\TestCase\getRecord().

23  {
24  $processor = new MemoryPeakUsageProcessor();
25  $record = $processor($this->getRecord());
26  $this->assertArrayHasKey('memory_peak_usage', $record['extra']);
27  $this->assertRegExp('#[0-9.]+ (M|K)?B$#', $record['extra']['memory_peak_usage']);
28  }
getRecord($level=Logger::WARNING, $message='test', $context=array())
Definition: TestCase.php:19
+ Here is the call graph for this function:

◆ testProcessorWithoutFormatting()

Monolog\Processor\MemoryPeakUsageProcessorTest::testProcessorWithoutFormatting ( )

Monolog::__invoke Monolog::formatBytes

Definition at line 34 of file MemoryPeakUsageProcessorTest.php.

References Monolog\TestCase\getRecord().

35  {
36  $processor = new MemoryPeakUsageProcessor(true, false);
37  $record = $processor($this->getRecord());
38  $this->assertArrayHasKey('memory_peak_usage', $record['extra']);
39  $this->assertInternalType('int', $record['extra']['memory_peak_usage']);
40  $this->assertGreaterThan(0, $record['extra']['memory_peak_usage']);
41  }
getRecord($level=Logger::WARNING, $message='test', $context=array())
Definition: TestCase.php:19
+ Here is the call graph for this function:

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