Completed
Push — master ( 311dae...76f744 )
by dan
05:40
created

PusherManagerTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace IrishDan\NotificationBundle\Test;
4
5
use IrishDan\NotificationBundle\PusherManager;
6
7
class PusherManagerTest extends NotificationTestCase
8
{
9
    protected $pusherManager;
10
11
    public function setUp()
12
    {
13
        $config = $this->getNotificationChannelConfiguration('pusher');
14
        $this->pusherManager = new PusherManager($config);
15
    }
16
17
    public function testGetPusherClient()
18
    {
19
        $client = $this->pusherManager->getPusherClient();
20
21
        $this->assertInstanceOf(\Pusher::class, $client);
22
    }
23
24
    public function testGetUserChannelName()
25
    {
26
        $user = $this->getTestUser();
27
28
        $channelName = $this->pusherManager->getUserChannelName($user);
29
30
        $this->assertEquals('pusher_test_1', $channelName);
31
    }
32
}