Passed
Push — master ( 487089...443b76 )
by Chris
03:30
created

UnknownMessageTest::testWireSizeProperty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace DaveRandom\LibLifxLan\Test\Messages;
4
5
use DaveRandom\LibLifxLan\Messages\UnknownMessage;
6
use PHPUnit\Framework\TestCase;
7
8
final class UnknownMessageTest extends TestCase
9
{
10
    private $messageTypeId = 12345;
11
    private $data = 'This is some test data';
12
13
    public function testDataProperty(): void
14
    {
15
        $this->assertSame((new UnknownMessage($this->messageTypeId, $this->data))->getData(), $this->data);
16
    }
17
18
    public function testTypeIdProperty(): void
19
    {
20
        $this->assertSame((new UnknownMessage($this->messageTypeId, $this->data))->getTypeId(), $this->messageTypeId);
21
    }
22
23
    public function testWireSizeProperty(): void
24
    {
25
        $this->assertSame((new UnknownMessage($this->messageTypeId, $this->data))->getWireSize(), \strlen($this->data));
26
    }
27
}
28