Completed
Pull Request — master (#51)
by
unknown
08:53
created

testNegativeInfiniteLog10()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
use Litipk\BigNumbers\InfiniteDecimal as InfiniteDecimal;
4
5
6
date_default_timezone_set('UTC');
7
8
9
class InfiniteDecimalLog10Test extends PHPUnit_Framework_TestCase
10
{
11
    /**
12
     * @expectedException \DomainException
13
     * @expectedExceptionMessage Decimal can't handle logarithms of negative numbers (it's only for real numbers).
14
     */
15
    public function testNegativeInfiniteLog10()
16
    {
17
        InfiniteDecimal::getNegativeInfinite()->log10();
18
    }
19
20
    public function testPInfiniteLog10()
21
    {
22
        $pInf = InfiniteDecimal::getPositiveInfinite();
23
24
        $this->assertTrue($pInf->log10()->equals($pInf));
25
    }
26
}
27