TokensTraitTest::test_getController()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace ByTIC\Payments\Tests\Models\Tokens;
4
5
use ByTIC\Payments\Models\Tokens\Tokens;
6
use ByTIC\Payments\Tests\AbstractTestCase;
7
8
/**
9
 * Class TransactionsTraitTest
10
 * @package ByTIC\Payments\Tests\Models\Transactions
11
 */
12
class TokensTraitTest extends AbstractTestCase
13
{
14
    public function test_relations()
15
    {
16
        $this->initUtilityModel('purchases');
17
        $this->initUtilityModel('transactions');
18
        $this->initUtilityModel('methods');
19
        $repository = new Tokens();
20
21
        self::assertTrue($repository->hasRelation('Transactions'));
22
        self::assertTrue($repository->hasRelation('Customer'));
23
        self::assertTrue($repository->hasRelation('PaymentMethod'));
24
    }
25
26
    public function test_getTable()
27
    {
28
        $repository = new Tokens();
29
30
        self::assertSame('payments-tokens', $repository->getTable());
31
    }
32
33
    public function test_getController()
34
    {
35
        $repository = new Tokens();
36
37
        self::assertSame('payments-tokens', $repository->getController());
38
    }
39
}
40