Passed
Push — master ( 5ace1f...ba21e2 )
by Gabriel
12:24
created

TokensTraitTest::test_getTable()   A

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('methods');
18
        $repository = Tokens::instance();
19
20
        self::assertTrue($repository->hasRelation('Purchase'));
21
        self::assertTrue($repository->hasRelation('PaymentMethod'));
22
    }
23
24
    public function test_getTable()
25
    {
26
        $repository = Tokens::instance();
27
28
        self::assertSame('payments-tokens', $repository->getTable());
29
    }
30
31
    public function test_getController()
32
    {
33
        $repository = Tokens::instance();
34
35
        self::assertSame('payments-tokens', $repository->getController());
36
    }
37
}
38