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.

MatcherSpec::let()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 15
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 11
nc 1
nop 0
1
<?php
2
3
namespace spec\Yoqut\Component\Sms\Gateway;
4
5
use PhpSpec\ObjectBehavior;
6
use Yoqut\Component\Sms\Model\SmsInterface;
7
use Yoqut\Component\Sms\Model\GatewayInterface;
8
use Yoqut\Component\Sms\Model\Sms;
9
use Yoqut\Component\Sms\Model\Gateway;
10
11
class MatcherSpec extends ObjectBehavior
12
{
13
    protected $gateways;
14
15
    function let()
16
    {
17
        $gateway = new Gateway(
18
            'localhost',
19
            2775,
20
            0x34,
21
            'username',
22
            'password',
23
            array('5555'),
24
            array('+555')
25
        );
26
27
        $this->gateways = array($gateway);
28
        $this->beConstructedWith($this->gateways);
29
    }
30
31
    function it_is_initializable()
32
    {
33
        $this->shouldHaveType('Yoqut\Component\Sms\Gateway\Matcher');
34
    }
35
36
    function it_implements_Yoqut_matcher_interface()
37
    {
38
        $this->shouldImplement('Yoqut\Component\Sms\Gateway\MatcherInterface');
39
    }
40
41
    function it_should_not_throw_exception_if_gateway_is_valid(SmsInterface $sms, GatewayInterface $gateway)
42
    {
43
        $this
44
            ->shouldNotThrow('Yoqut\Component\Sms\Gateway\Exception\InvalidGatewayException')
45
            ->duringMatch($sms, $gateway);
46
    }
47
48
    function it_should_match_gateway_if_it_exists()
49
    {
50
        $sms = new Sms();
51
        $sms->setSender('sender');
52
        $sms->setRecipient('+5550100');
53
        $sms->setMessage('message');
54
55
        $this->match($sms)->shouldNotReturn(null);
56
    }
57
58
    function it_should_support_valid_gateway(GatewayInterface $gateway)
59
    {
60
        $this->supports($gateway)->shouldReturn(true);
61
    }
62
}
63