Completed
Pull Request — develop (#48)
by Luís
03:01
created

TypeTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 21
rs 10
1
<?php
2
namespace PHPSC\PagSeguro\Shipping;
3
4
/**
5
 * @author Renato Moura <[email protected]>
6
 */
7
class TypeTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testGetTypesShouldDoReturnArray()
10
    {
11
        $expected = [1, 2, 3];
12
        $this->assertEquals($expected, Type::getTypes());
13
    }
14
15
    public function testValidShouldReturnTrue()
16
    {
17
        $this->assertTrue(Type::isValid(1));
18
        $this->assertTrue(Type::isValid(2));
19
        $this->assertTrue(Type::isValid(3));
20
    }
21
22
    public function testValuesInvalidShouldReturnFalse()
23
    {
24
        $this->assertFalse(Type::isValid(0));
25
        $this->assertFalse(Type::isValid(4));
26
    }
27
}
28