diff options
-rw-r--r-- | src/Monolog/Handler/Slack/SlackRecord.php | 1 | ||||
-rw-r--r-- | tests/Monolog/Handler/Slack/SlackRecordTest.php | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/Monolog/Handler/Slack/SlackRecord.php b/src/Monolog/Handler/Slack/SlackRecord.php index 1432502..cb0b871 100644 --- a/src/Monolog/Handler/Slack/SlackRecord.php +++ b/src/Monolog/Handler/Slack/SlackRecord.php @@ -99,7 +99,6 @@ class SlackRecord $dataArray = array( 'username' => $this->username, 'text' => '', - 'attachments' => array(), ); if ($this->channel) { diff --git a/tests/Monolog/Handler/Slack/SlackRecordTest.php b/tests/Monolog/Handler/Slack/SlackRecordTest.php index 351b92d..d6c6c22 100644 --- a/tests/Monolog/Handler/Slack/SlackRecordTest.php +++ b/tests/Monolog/Handler/Slack/SlackRecordTest.php @@ -143,13 +143,12 @@ class SlackRecordTest extends TestCase $this->assertSame('', $data['text']); } - public function testAttachmentsEmptyIfNoAttachment() + public function testAttachmentsNotPresentIfNoAttachment() { $record = new SlackRecord($this->channel, 'Monolog', false); $data = $record->getSlackData($this->getRecord()); - $this->assertArrayHasKey('attachments', $data); - $this->assertSame(array(), $data['attachments']); + $this->assertArrayNotHasKey('attachments', $data); } public function testAddsOneAttachment() |