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

SetGroupTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 22
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A testWireSizeProperty() 0 3 1
A testTypeIdProperty() 0 3 1
A testGroupProperty() 0 3 1
A setUp() 0 3 1
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