Code Duplication    Length = 23-23 lines in 4 locations

tests/Validator/BankAccountTest.php 1 location

@@ 20-42 (lines=23) @@
17
18
use mrcnpdlk\Validator\Types\BankAccount;
19
20
class BankAccountTest extends TestCase
21
{
22
    public function setUp()
23
    {
24
        parent::setUp();
25
    }
26
27
    public function testBankAccountValid()
28
    {
29
        $defNr = '13 1020-2791 2123 5389 7801 0731';
30
        $res = new BankAccount($defNr);
31
        $this->assertEquals('13102027912123538978010731',$res->get());
32
    }
33
34
    /**
35
     * @expectedException \mrcnpdlk\Validator\Exception
36
     */
37
    public function testBankAccountInvalid()
38
    {
39
        $res = new BankAccount('13102027912123538978010730');
40
    }
41
42
}
43

tests/Validator/IDCardTest.php 1 location

@@ 20-42 (lines=23) @@
17
18
use mrcnpdlk\Validator\Types\IDCard;
19
20
class IDCardTest extends TestCase
21
{
22
    public function setUp()
23
    {
24
        parent::setUp();
25
    }
26
27
    public function testIDCardValid()
28
    {
29
        $defNr = 'aha051591  ';
30
        $res = new IDCard($defNr);
31
        $this->assertEquals('AHA051591',$res->get());
32
    }
33
34
    /**
35
     * @expectedException \mrcnpdlk\Validator\Exception
36
     */
37
    public function testIDCardInvalid()
38
    {
39
        $res = new IDCard('AHA051590');
40
    }
41
42
}
43

tests/Validator/KrsTest.php 1 location

@@ 19-41 (lines=23) @@
16
17
use mrcnpdlk\Validator\Types\Krs;
18
19
class KrsTest extends TestCase
20
{
21
    public function setUp()
22
    {
23
        parent::setUp();
24
    }
25
26
    public function testKrsValid()
27
    {
28
        $defNr = '311911';
29
        $res   = new Krs($defNr);
30
        $this->assertEquals('0000311911', $res->get());
31
    }
32
33
    /**
34
     * @expectedException \mrcnpdlk\Validator\Exception
35
     */
36
    public function testKrsInvalid()
37
    {
38
        $res = new Krs('000031d1911');
39
    }
40
41
}
42

tests/Validator/RegonTest.php 1 location

@@ 19-41 (lines=23) @@
16
17
use mrcnpdlk\Validator\Types\Regon;
18
19
class RegonTest extends TestCase
20
{
21
    public function setUp()
22
    {
23
        parent::setUp();
24
    }
25
26
    public function testRegonValid()
27
    {
28
        $defNr = '331501';
29
        $res   = new Regon($defNr);
30
        $this->assertEquals('000331501', $res->get());
31
    }
32
33
    /**
34
     * @expectedException \mrcnpdlk\Validator\Exception
35
     */
36
    public function testRegonInvalid()
37
    {
38
        $res = new Regon('000331502');
39
    }
40
41
}
42