Completed
Push — master ( b9f967...7a222d )
by Andreu
9s
created

DecimalAbsTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 7
Bugs 2 Features 2
Metric Value
wmc 1
c 7
b 2
f 2
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
5
6
date_default_timezone_set('UTC');
7
8
9
class DecimalAbsTest extends PHPUnit_Framework_TestCase
10
{
11
    public function testAbs()
12
    {
13
        $this->assertTrue(Decimal::fromInteger(0)->abs()->equals(Decimal::fromInteger(0)));
14
        $this->assertTrue(Decimal::fromInteger(5)->abs()->equals(Decimal::fromInteger(5)));
15
        $this->assertTrue(Decimal::fromInteger(-5)->abs()->equals(Decimal::fromInteger(5)));
16
    }
17
}
18