Completed
Push — master ( 58620c...f23d9f )
by Vitaliy
02:20
created

shouldThrowExceptionIfTrySetInvalidCustomData()   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
/*
4
 * This file is part of the AppleApnPush package
5
 *
6
 * (c) Vitaliy Zhuk <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code
10
 */
11
12
namespace Tests\Apple\ApnPush\Model;
13
14
use Apple\ApnPush\Model\ApsData;
15
use Apple\ApnPush\Model\Message;
16
use PHPUnit\Framework\TestCase;
17
18
class MessageTest extends TestCase
19
{
20
    /**
21
     * @test
22
     *
23
     * @expectedException \InvalidArgumentException
24
     * @expectedExceptionMessage The custom data value should be a scalar or \JsonSerializable instance, but "stdClass" given.
25
     */
26
    public function shouldThrowExceptionIfTrySetInvalidCustomData()
27
    {
28
        $message = new Message(new ApsData());
29
        $message->withCustomData('some', new \stdClass());
30
    }
31
}
32