Completed
Push — master ( fe9f84...fb76d4 )
by Marcin
03:59
created

IDCardTest::testIDCardValid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
/**
3
 * Validator
4
 *
5
 * Copyright (c) 2017 pudelek.org.pl
6
 *
7
 * @license MIT License (MIT)
8
 *
9
 * For the full copyright and license information, please view source file
10
 * that is bundled with this package in the file LICENSE
11
 *
12
 * @author Marcin Pudełek <[email protected]>
13
 */
14
15
namespace mrcnpdlk\Validator;
16
17
18
use mrcnpdlk\Validator\Types\IDCard;
19
20
class IDCardTest extends TestCase
21
{
22
    public function testIDCardValid()
23
    {
24
        $defNr = 'aha 051591  ';
25
        $res = new IDCard($defNr);
26
        $this->assertEquals('AHA051591',$res->get());
27
    }
28
29
    /**
30
     * @expectedException \mrcnpdlk\Validator\Exception
31
     */
32
    public function testIDCardInvalid()
33
    {
34
        new IDCard('AHA051590');
35
    }
36
37
}
38