WebhookTest::testSimpleMessage()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 2
nc 2
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace DiscordWebhook\Test;
5
6
use DiscordWebhook\Webhook;
7
use GuzzleHttp\Client;
8
use GuzzleHttp\Exception\GuzzleException;
9
10
class WebhookTest extends AbstractTestCase
11
{
12
    public function testInstance(): void
13
    {
14
        $client = $this->webhook;
15
16
        $this->assertInstanceOf(Webhook::class, $client);
17
    }
18
19
    public function testSimpleMessage(): void
20
    {
21
        $client = $this->webhook;
22
        $client->setMessage('test');
23
24
        try {
25
            $this->assertTrue($client->send());
26
        } catch (GuzzleException $e) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
27
        }
28
    }
29
}
30