Code Duplication    Length = 8-9 lines in 4 locations

tests/Util/TemperatureTest.php 4 locations

@@ 54-62 (lines=9) @@
51
        $this->temperature = new Temperature($tempNowUnit, $tempMinUnit, $tempMaxUnit);
52
    }
53
54
    public function test__toString()
55
    {
56
        $expectStr = $this->nowTemp;
57
        $expectStr .= ' ' . $this->unit;
58
        $str = $this->temperature->__toString();
59
60
        $this->assertSame($expectStr, $str);
61
        $this->assertInternalType('string', $str);
62
    }
63
64
    public function testGetUnit()
65
    {
@@ 64-71 (lines=8) @@
61
        $this->assertInternalType('string', $str);
62
    }
63
64
    public function testGetUnit()
65
    {
66
        $expectUnit = $this->unit;
67
        $unit = $this->temperature->getUnit();
68
69
        $this->assertSame($expectUnit, $unit);
70
        $this->assertInternalType('string', $unit);
71
    }
72
73
    public function testGetValue()
74
    {
@@ 82-89 (lines=8) @@
79
        $this->assertInternalType('double', $value);
80
    }
81
82
    public function testGetDescription()
83
    {
84
        $expectDescription = $this->description;
85
        $description = $this->temperature->getDescription();
86
87
        $this->assertSame($expectDescription, $description);
88
        $this->assertInternalType('string', $description);
89
    }
90
91
    public function testGetFormatted()
92
    {
@@ 91-99 (lines=9) @@
88
        $this->assertInternalType('string', $description);
89
    }
90
91
    public function testGetFormatted()
92
    {
93
        $expectFormattedString = $this->nowTemp;
94
        $expectFormattedString .= ' ' . $this->unit;
95
        $formattedString = $this->temperature->getFormatted();
96
97
        $this->assertSame($expectFormattedString, $formattedString);
98
        $this->assertInternalType('string', $formattedString);
99
    }
100
}
101