Completed
Push — master ( 883139...5ac6b4 )
by Vuong
01:54
created

BankWidgetTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 24
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testOutput() 0 9 1
A testBankList() 0 9 1
1
<?php
2
/**
3
 * @link https://github.com/yiiviet/yii2-payment
4
 * @copyright Copyright (c) 2017 Yii Viet
5
 * @license [New BSD License](http://www.opensource.org/licenses/bsd-license.php)
6
 */
7
8
9
namespace yiiviet\tests\unit\payment;
10
11
use yiiviet\payment\BankWidget;
12
13
/**
14
 * Lớp BankWidgetTest
15
 *
16
 * @author Vuong Minh <[email protected]>
17
 * @since 1.0.3
18
 */
19
abstract class BankWidgetTest extends TestCase
20
{
21
22
    public function testOutput()
23
    {
24
        $output = BankWidget::widget([
25
            'gateway' => $this->gateway,
26
            'name' => 'a'
27
        ]);
28
29
        $this->assertNotEmpty($output);
30
    }
31
32
    public function testBankList()
33
    {
34
        $widget = new BankWidget([
35
            'gateway' => $this->gateway,
36
            'name' => 'a'
37
        ]);
38
39
        $this->assertNotEmpty($widget->getBankProvider()->banks());
40
    }
41
42
}
43