Completed
Push — master ( 3ced6b...53bd9f )
by Marcin
01:36
created

KrsTest::testCreate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
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
use mrcnpdlk\Validator\Types\Krs;
18
19
class KrsTest extends TestCase
20
{
21
    public function testKrsValid()
22
    {
23
        $defNr = '311911';
24
        $res   = new Krs($defNr);
25
        $this->assertEquals('0000311911', $res->get());
26
    }
27
28
    public function testCreate()
29
    {
30
        $res = Krs::create('0012345678');
31
        $this->assertEquals('0012345678', $res->get());
32
    }
33
34
35
    /**
36
     * @expectedException \mrcnpdlk\Validator\Exception
37
     */
38
    public function testKrsInvalid()
39
    {
40
        new Krs('000031d1911');
41
    }
42
43
}
44