Completed
Push — master ( 666d36...a3ce9d )
by Sam
02:53
created

HinfoRdataTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testOutput() 0 11 1
A testGetters() 0 11 1
1
<?php
2
3
/*
4
 * This file is part of Badcow DNS Library.
5
 *
6
 * (c) Samuel Williams <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Badcow\DNS\Tests\Rdata;
13
14
use Badcow\DNS\Rdata\HINFO;
15
16
class HinfoRdataTest extends \PHPUnit\Framework\TestCase
17
{
18
    public function testOutput()
19
    {
20
        $cpu = '2.7GHz';
21
        $os = 'Ubuntu 12.04';
22
        $expectation = '"2.7GHz" "Ubuntu 12.04"';
23
        $hinfo = new HINFO();
24
        $hinfo->setCpu($cpu);
25
        $hinfo->setOs($os);
26
27
        $this->assertEquals($expectation, $hinfo->output());
28
    }
29
30
    public function testGetters()
31
    {
32
        $cpu = '2.7GHz';
33
        $os = 'Ubuntu 12.04';
34
        $hinfo = new HINFO();
35
        $hinfo->setCpu($cpu);
36
        $hinfo->setOs($os);
37
38
        $this->assertEquals($cpu, $hinfo->getCpu());
39
        $this->assertEquals($os, $hinfo->getOs());
40
    }
41
}
42