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

SetGroupTest::testTypeIdProperty()   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
2
3
namespace DaveRandom\LibLifxLan\Tests\Messages\Device\Commands;
4
5
use DaveRandom\LibLifxLan\DataTypes\Group;
6
use DaveRandom\LibLifxLan\DataTypes\Label;
7
use DaveRandom\LibLifxLan\Messages\Device\Commands\SetGroup;
8
use PHPUnit\Framework\TestCase;
9
use Ramsey\Uuid\Uuid;
10
11
final class SetGroupTest extends TestCase
12
{
13
    private $group;
14
15
    protected function setUp(): void
16
    {
17
        $this->group = new Group(Uuid::getFactory()->uuid4(), new Label('Test'), new \DateTime);
18
    }
19
20
    public function testGroupProperty(): void
21
    {
22
        $this->assertSame((new SetGroup($this->group))->getGroup(), $this->group);
23
    }
24
25
    public function testTypeIdProperty(): void
26
    {
27
        $this->assertSame((new SetGroup($this->group))->getTypeId(), SetGroup::MESSAGE_TYPE_ID);
28
    }
29
30
    public function testWireSizeProperty(): void
31
    {
32
        $this->assertSame((new SetGroup($this->group))->getWireSize(), SetGroup::WIRE_SIZE);
33
    }
34
}
35