GcmReceiverTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testBadToken() 0 4 1
1
<?php
2
/**
3
 * Push notification services abstraction (http://github.com/juliangut/tify)
4
 *
5
 * @link https://github.com/juliangut/tify for the canonical source repository
6
 *
7
 * @license https://github.com/juliangut/tify/blob/master/LICENSE
8
 */
9
10
namespace Jgut\Tify\Tests\Receiver;
11
12
use Jgut\Tify\Receiver\GcmReceiver;
13
14
/**
15
 * Gcm receiver tests.
16
 */
17
class GcmReceiverTest extends \PHPUnit_Framework_TestCase
18
{
19
    /**
20
     * @var \Jgut\Tify\Receiver\GcmReceiver
21
     */
22
    protected $receiver;
23
24
    public function setUp()
25
    {
26
        $this->receiver = new GcmReceiver('f59c88b12035278b86f26d448835939a');
27
    }
28
29
    /**
30
     * @expectedException \InvalidArgumentException
31
     */
32
    public function testBadToken()
33
    {
34
        $this->receiver->setToken('    ');
35
    }
36
}
37