Completed
Pull Request — develop (#48)
by Luís
02:58 queued 50s
created

PeriodTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 18
rs 10
1
<?php
2
namespace PHPSC\PagSeguro\Requests\PreApprovals;
3
4
/**
5
 * @author Renato Moura <[email protected]>
6
 */
7
class PeriodTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testValidShouldReturnTrue()
10
    {
11
        $this->assertTrue(Period::isValid('WEEKLY'));
12
        $this->assertTrue(Period::isValid('MONTHLY'));
13
        $this->assertTrue(Period::isValid('BIMONTHLY'));
14
        $this->assertTrue(Period::isValid('TRIMONTHLY'));
15
        $this->assertTrue(Period::isValid('SEMIANNUALLY'));
16
        $this->assertTrue(Period::isValid('YEARLY'));
17
    }
18
19
    public function testValuesInvalidShouldReturnFalse()
20
    {
21
        $this->assertFalse(Period::isValid('Weekly'));
22
        $this->assertFalse(Period::isValid('other'));
23
    }
24
}
25