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

TokensTraitTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 24
rs 10
c 2
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A test_relations() 0 8 1
A test_getTable() 0 5 1
A test_getController() 0 5 1
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