Code Duplication    Length = 12-12 lines in 2 locations

tests/BankValidatorTest.php 2 locations

@@ 46-57 (lines=12) @@
43
     * @throws \ReflectionException
44
     * @throws \yii\base\InvalidConfigException
45
     */
46
    public function testValidBankId()
47
    {
48
        $banks = $this->getBankProvider()->banks();
49
        $this->assertTrue($banks[91] === "Vietinbank - Ngân hàng Công thương Việt Nam");
50
        $model = new DynamicModel([
51
            'bankId' => 91
52
        ]);
53
        $model->addRule('bankId', 'bankvn', [
54
            'gateway' => $this->gateway
55
        ]);
56
        $this->assertTrue($model->validate());
57
    }
58
59
    /**
60
     * @throws \ReflectionException
@@ 64-75 (lines=12) @@
61
     * @throws \yii\base\InvalidConfigException
62
     * @depends testValidBankId
63
     */
64
    public function testInValidBankId()
65
    {
66
        $banks = $this->getBankProvider()->banks();
67
        $this->assertFalse(isset($banks[10000]));
68
        $model = new DynamicModel([
69
            'bankId' => 10000
70
        ]);
71
        $model->addRule('bankId', 'bankvn', [
72
            'gateway' => $this->gateway
73
        ]);
74
        $this->assertFalse($model->validate());
75
    }
76
77
    /**
78
     * @throws \ReflectionException