DecimalAbsTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAbs() 0 6 1
1
<?php
2
3
use Litipk\BigNumbers\Decimal as Decimal;
4
use PHPUnit\Framework\TestCase;
5
6
date_default_timezone_set('UTC');
7
8
class DecimalAbsTest extends TestCase
9
{
10
    public function testAbs()
11
    {
12
        $this->assertTrue(Decimal::fromInteger(0)->abs()->equals(Decimal::fromInteger(0)));
13
        $this->assertTrue(Decimal::fromInteger(5)->abs()->equals(Decimal::fromInteger(5)));
14
        $this->assertTrue(Decimal::fromInteger(-5)->abs()->equals(Decimal::fromInteger(5)));
15
    }
16
}
17