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

FrameTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 2
A testSourcePropertyValueTooLow() 0 3 1
A testSourcePropertyValueTooHigh() 0 3 1
1
<?php
2
3
namespace DaveRandom\LibLifxLan\Tests\Header\x64;
4
5
use DaveRandom\LibLifxLan\Header\Frame;
6
use const DaveRandom\LibLifxLan\UINT32_MAX;
1 ignored issue
show
Bug introduced by
The constant DaveRandom\LibLifxLan\UINT32_MAX was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
7
use const DaveRandom\LibLifxLan\UINT32_MIN;
1 ignored issue
show
Bug introduced by
The constant DaveRandom\LibLifxLan\UINT32_MIN was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
8
9
final class FrameTest extends \DaveRandom\LibLifxLan\Tests\Header\FrameTest
10
{
11
    protected function setUp(): void
12
    {
13
        if (\PHP_INT_SIZE === 4) {
14
            $this->markTestSkipped('64-bit platforms only');
15
        }
16
    }
17
18
    /**
19
     * @expectedException \DaveRandom\LibLifxLan\Exceptions\InvalidValueException
20
     */
21
    public function testSourcePropertyValueTooLow(): void
22
    {
23
        new Frame(0, 0, false, false, 0, UINT32_MIN - 1);
24
    }
25
26
    /**
27
     * @expectedException \DaveRandom\LibLifxLan\Exceptions\InvalidValueException
28
     */
29
    public function testSourcePropertyValueTooHigh(): void
30
    {
31
        new Frame(0, 0, false, false, 0, UINT32_MAX + 1);
32
    }
33
}
34