GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( fbbdbd...789991 )
by Šimon
02:05
created

SmsMessageTest::testNoRecipientsThrowException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimPod\SmsManager\Tests;
6
7
use PHPUnit\Framework\TestCase;
8
use SimPod\SmsManager\Exception\NoRecipientsProvided;
9
use SimPod\SmsManager\RequestType;
10
use SimPod\SmsManager\SmsMessage;
11
12
final class SmsMessageTest extends TestCase
13
{
14
    /**
15
     * @dataProvider dataProviderConstruct
16
     */
17
    public function testConstruct(RequestType $expectedRequestType, ?RequestType $requestType) : void
18
    {
19
        $message    = 'Anchovy essence soup is just not the same without anise and bitter ground pickles.';
20
        $recipients = ['+420777888999'];
21
        $sender     = 'sender';
22
        $customId   = 1;
23
        $smsMessage = new SmsMessage($message, $recipients, $requestType, $sender, $customId);
24
25
        self::assertSame($message, $smsMessage->getMessage());
26
        self::assertSame($recipients, $smsMessage->getRecipients());
27
        self::assertSame($expectedRequestType, $smsMessage->getRequestType());
28
        self::assertSame($sender, $smsMessage->getSender());
29
        self::assertSame($customId, $smsMessage->getCustomId());
30
    }
31
32
    public function testNoRecipientsThrowException() : void
33
    {
34
        $this->expectException(NoRecipientsProvided::class);
35
36
        new SmsMessage('', []);
37
    }
38
39
    /**
40
     * @return mixed[][]
41
     */
42
    public function dataProviderConstruct() : array
43
    {
44
        return [
45
            [RequestType::getRequestTypeHigh(), null],
46
            [RequestType::getRequestTypeLow(), RequestType::getRequestTypeLow()],
47
        ];
48
    }
49
}
50