ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
Monolog\Processor\MemoryUsageProcessorTest Class Reference
+ Inheritance diagram for Monolog\Processor\MemoryUsageProcessorTest:
+ Collaboration diagram for Monolog\Processor\MemoryUsageProcessorTest:

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 MemoryUsageProcessorTest.php.

Member Function Documentation

◆ testProcessor()

Monolog\Processor\MemoryUsageProcessorTest::testProcessor ( )

Monolog::__invoke Monolog::formatBytes

Definition at line 22 of file MemoryUsageProcessorTest.php.

References Monolog\TestCase\getRecord().

23  {
24  $processor = new MemoryUsageProcessor();
25  $record = $processor($this->getRecord());
26  $this->assertArrayHasKey('memory_usage', $record['extra']);
27  $this->assertRegExp('#[0-9.]+ (M|K)?B$#', $record['extra']['memory_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\MemoryUsageProcessorTest::testProcessorWithoutFormatting ( )

Monolog::__invoke Monolog::formatBytes

Definition at line 34 of file MemoryUsageProcessorTest.php.

References Monolog\TestCase\getRecord().

35  {
36  $processor = new MemoryUsageProcessor(true, false);
37  $record = $processor($this->getRecord());
38  $this->assertArrayHasKey('memory_usage', $record['extra']);
39  $this->assertInternalType('int', $record['extra']['memory_usage']);
40  $this->assertGreaterThan(0, $record['extra']['memory_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: