ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Monolog\Formatter\FlowdockFormatterTest Class Reference
+ Inheritance diagram for Monolog\Formatter\FlowdockFormatterTest:
+ Collaboration diagram for Monolog\Formatter\FlowdockFormatterTest:

Public Member Functions

 testFormat ()
 @covers Monolog\Formatter\FlowdockFormatter::format More...
 
 testFormatBatch ()
 @ covers Monolog\Formatter\FlowdockFormatter::formatBatch 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 17 of file FlowdockFormatterTest.php.

Member Function Documentation

◆ testFormat()

Monolog\Formatter\FlowdockFormatterTest::testFormat ( )

@covers Monolog\Formatter\FlowdockFormatter::format

Definition at line 22 of file FlowdockFormatterTest.php.

23 {
24 $formatter = new FlowdockFormatter('test_source', 'source@test.com');
25 $record = $this->getRecord();
26
27 $expected = array(
28 'source' => 'test_source',
29 'from_address' => 'source@test.com',
30 'subject' => 'in test_source: WARNING - test',
31 'content' => 'test',
32 'tags' => array('#logs', '#warning', '#test'),
33 'project' => 'test_source',
34 );
35 $formatted = $formatter->format($record);
36
37 $this->assertEquals($expected, $formatted['flowdock']);
38 }
getRecord($level=Logger::WARNING, $message='test', $context=array())
Definition: TestCase.php:19

References Monolog\TestCase\getRecord().

+ Here is the call graph for this function:

◆ testFormatBatch()

Monolog\Formatter\FlowdockFormatterTest::testFormatBatch ( )

@ covers Monolog\Formatter\FlowdockFormatter::formatBatch

Definition at line 43 of file FlowdockFormatterTest.php.

44 {
45 $formatter = new FlowdockFormatter('test_source', 'source@test.com');
46 $records = array(
49 );
50 $formatted = $formatter->formatBatch($records);
51
52 $this->assertArrayHasKey('flowdock', $formatted[0]);
53 $this->assertArrayHasKey('flowdock', $formatted[1]);
54 }
const WARNING
Exceptional occurrences that are not errors.
Definition: Logger.php:52
const DEBUG
Detailed debug information.
Definition: Logger.php:32
$records
Definition: simple_test.php:17

References $records, Monolog\Logger\DEBUG, Monolog\TestCase\getRecord(), and Monolog\Logger\WARNING.

+ Here is the call graph for this function:

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