UserTest::it_can_send_to_a_user()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 19
rs 9.4285
cc 1
eloc 11
nc 1
nop 0
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