26 const WEBHOOK_URL =
'https://hooks.slack.com/services/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E';
36 $slackRecord =
$handler->getSlackRecord();
37 $this->assertInstanceOf(
'Monolog\Handler\Slack\SlackRecord', $slackRecord);
38 $this->assertEquals(array(
39 'attachments' => array(
52 'mrkdwn_in' => array(
'fields'),
53 'ts' => $record[
'datetime']->getTimestamp(),
56 ), $slackRecord->getSlackData($record));
77 $slackRecord =
$handler->getSlackRecord();
78 $this->assertInstanceOf(
'Monolog\Handler\Slack\SlackRecord', $slackRecord);
79 $this->assertEquals(array(
80 'username' =>
'test-username',
82 'channel' =>
'test-channel',
83 'icon_emoji' =>
':ghost:',
84 ), $slackRecord->getSlackData($this->getRecord()));
93 $formatter =
$handler->getFormatter();
94 $this->assertInstanceOf(
'Monolog\Formatter\FormatterInterface', $formatter);
105 $this->assertSame($formatter,
$handler->getFormatter());
testConstructorFull()
::__construct ::getSlackRecord
const DEBUG
Detailed debug information.
Sends notifications through Slack Webhooks.
getRecord($level=Logger::WARNING, $message='test', $context=array())
testGetFormatter()
::getFormatter
testConstructorMinimal()
::__construct ::getSlackRecord
testSetFormatter()
::setFormatter