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

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