UserTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 1
c 3
b 0
f 1
lcom 1
cbo 2
dl 0
loc 24
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A it_can_send_to_a_user() 0 19 1
1
<?php
2
3
require_once 'base/PHPushbulletTestBase.php';
4
5
class UserTest extends PHPushbulletTestBase
6
{
7
    /** @test */
8
9
    public function it_can_send_to_a_user()
10
    {
11
        $response = $this->pushResponse([
12
          'type'  => 'note',
13
          'title' => 'Reminder',
14
          'body'  => 'Do this thing',
15
        ]);
16
17
        $this->mock([
18
            $this->okResponse($response),
19
        ]);
20
21
        $response = $this->pushbullet->user('[email protected]')->note('Title', 'Body');
22
23
        $this->assertInternalType('array', $response);
24
        $this->assertCount(1, $response);
25
26
        $this->assertRequestHistory(['pushes']);
27
    }
28
}
29