GatewayFactoryTest::getNameProvider()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace ByTIC\Payments\Tests\Gateways;
4
5
use ByTIC\Payments\Gateways\GatewayFactory;
6
use Paytic\Payments\Tests\AbstractTest;
7
8
/**
9
 * Class GatewayFactoryTest
10
 * @package ByTIC\Payments\Tests\Gateways
11
 */
12
class GatewayFactoryTest extends AbstractTest
13
{
14
    /**
15
     * @dataProvider getNameProvider
16
     * @param $short
17
     * @param $class
18
     */
19
    public function testGetGatewayClassName($short, $class)
20
    {
21
        self::assertEquals(
22
            $class,
23
            GatewayFactory::getGatewayClassName($short)
24
        );
25
    }
26
27
    /**
28
     * @return array
29
     */
30
    public function getNameProvider()
31
    {
32
        return [
33
            ['Payu', '\Paytic\Payments\Payu\Gateway'],
34
            ['Euplatesc', '\Paytic\Payments\Euplatesc\Gateway'],
35
            ['Twispay', '\Paytic\Payments\Twispay\Gateway'],
36
            ['Librapay', '\Paytic\Payments\Librapay\Gateway'],
37
            ['Mobilpay', '\Paytic\Payments\Mobilpay\Gateway'],
38
        ];
39
    }
40
}
41