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

FrameTest::testSourcePropertyValueTooHigh()   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\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