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

InfiniteDecimalCosTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

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