Completed
Push — master ( 04f203...b3922d )
by Gennady
02:26
created

ClientTest::testCreatePushURI()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Apns;
4
5
class ClientTest extends \PHPUnit_Framework_TestCase
6
{
7
    public function testCreateSandbox()
8
    {
9
        $client = new Client('', true);
10
        $this->assertContains('development', $client->getServer());
11
    }
12
13
    public function testCreateProd()
14
    {
15
        $client = new Client('', false);
16
        $this->assertNotContains('development', $client->getServer());
17
    }
18
19
    public function testCreatePushURI()
20
    {
21
        $client = new Client('', true);
22
        $pushUri = $client->getPushURI((new Message())->setDeviceIdentifier('foobar'));
23
24
        $this->assertContains('development', $pushUri);
25
        $this->assertContains('foobar', $pushUri);
26
    }
27
}