public function testInstantiationWithDefaults() { $defaults = ['channel' => '#random', 'username' => 'Archer', 'icon' => ':ghost:', 'link_names' => true, 'unfurl_links' => true, 'unfurl_media' => false, 'allow_markdown' => false, 'markdown_in_attachments' => ['text']]; $client = new Client('http://fake.endpoint', $defaults); $this->assertSame($defaults['channel'], $client->getDefaultChannel()); $this->assertSame($defaults['username'], $client->getDefaultUsername()); $this->assertSame($defaults['icon'], $client->getDefaultIcon()); $this->assertTrue($client->getLinkNames()); $this->assertTrue($client->getUnfurlLinks()); $this->assertFalse($client->getUnfurlMedia()); $this->assertSame($defaults['allow_markdown'], $client->getAllowMarkdown()); $this->assertSame($defaults['markdown_in_attachments'], $client->getMarkdownInAttachments()); }
/** * Get the attachment fields which should be formatted * in Slack's Markdown-like language * * @return array * @static */ public static function getMarkdownInAttachments() { return \Maknz\Slack\Client::getMarkdownInAttachments(); }