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

InfiniteDecimalTanTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 1 Features 1
Metric Value
wmc 2
c 1
b 1
f 1
lcom 0
cbo 3
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testFinitePositiveInfiniteTan() 0 4 1
A testFiniteNegativeInfiniteTan() 0 4 1
1
<?php
2
3
use Litipk\BigNumbers\InfiniteDecimal as InfiniteDecimal;
4
5
/**
6
 * @group cos
7
 */
8
class InfiniteDecimalTanTest extends PHPUnit_Framework_TestCase
9
{
10
    /**
11
     * @expectedException \DomainException
12
     * @expectedExceptionMessage Tangent function hasn't limit in the positive infinite.
13
     */
14
    public function testFinitePositiveInfiniteTan()
15
    {
16
        InfiniteDecimal::getPositiveInfinite()->tan();
17
    }
18
19
    /**
20
     * @expectedException \DomainException
21
     * @expectedExceptionMessage Tangent function hasn't limit in the negative infinite.
22
     */
23
    public function testFiniteNegativeInfiniteTan()
24
    {
25
        InfiniteDecimal::getNegativeInfinite()->tan();
26
    }
27
}
28