RecordsTraitTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testGetStatuses() 0 10 1
1
<?php
2
3
namespace ByTIC\Models\SmartProperties\Tests\RecordsTraits\HasTypes;
4
5
use ByTIC\Models\SmartProperties\Tests\AbstractTest;
6
use ByTIC\Models\SmartProperties\Tests\Fixtures\RecordsTraits\HasTypes\Records;
7
use ByTIC\Models\SmartProperties\Tests\Fixtures\RecordsTraits\HasTypes\Types\Custom\Tournament;
8
9
/**
10
 * Class TraitsTest
11
 * @package ByTIC\Models\SmartProperties\Tests\Payments\Methods
12
 */
13
class RecordsTraitTest extends AbstractTest
14
{
15
    /**
16
     * @var Records
17
     */
18
    private $object;
19
20
    public function testGetStatuses()
21
    {
22
        $types = $this->object->getTypes();
23
        self::assertCount(3, $types);
24
25
        self::assertArrayHasKey('custom-tournament', $types);
26
        self::assertArrayHasKey('individual', $types);
27
        self::assertArrayHasKey('relay', $types);
28
29
        self::assertInstanceOf(Tournament::class, $this->object->getType('tournament'));
30
    }
31
32
33
    protected function setUp(): void
34
    {
35
        parent::setUp();
36
        $this->object = new Records();
37
    }
38
}
39