Passed
Push — main ( 925fbd...c6945e )
by Diego
03:10
created

IdentityTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 14
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testConstructor() 0 4 1
A testFromArray() 0 4 1
1
<?php
2
3
namespace Blackmine\Tests\Model;
4
5
use Blackmine\Model\Identity;
6
7
class IdentityTest extends AbstractModelTest
8
{
9
    public const TEST_MODEL = Identity::class;
10
11
    public function testConstructor(): void
12
    {
13
        $identity = new Identity(id: 1);
14
        $this->assertEquals(1, $identity->getId());
15
    }
16
17
    public function testFromArray(): void
18
    {
19
        $identity = (new Identity())->fromArray(["id" => 1]);
20
        $this->assertEquals(1, $identity->getId());
21
    }
22
}
23