Passed
Push — master ( 1618ee...d743d1 )
by Gabriel
03:38
created

GatewayTest::testIsActive()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 17
rs 9.9332
cc 1
nc 1
nop 0
1
<?php
2
3
namespace ByTIC\Payments\Tests\Gateways\Providers\Paylike;
4
5
use ByTIC\Payments\Gateways\Providers\Paylike\Gateway;
6
7
use ByTIC\Payments\Tests\AbstractTest as AbstractGatewayTest;
8
//use ByTIC\Payments\Tests\Gateways\Providers\AbstractGateway\GatewayTest as AbstractGatewayTest;
9
10
/**
11
 * Class GatewayTest
12
 * @package ByTIC\Payments\Tests\Gateways\Providers\Paylike
13
 */
14
class GatewayTest extends AbstractGatewayTest
15
{
16
17
    public function testIsActive()
18
    {
19
        $gateway = new Gateway();
20
        self::assertFalse($gateway->isActive());
21
22
        $gateway->setPublicKey('99');
23
        $gateway->setPrivateKey('99');
24
25
        self::assertFalse($gateway->isActive());
26
27
        $gatewayParams= [
28
            'public_key' => '99999999',
29
            'private_key' => '99999999'
30
        ];
31
        $gateway->initialize($gatewayParams);
32
33
        self::assertTrue($gateway->isActive());
34
    }
35
}
36