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

IdentityTest::testFromArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
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