Passed
Branch 1.0.0 (1c6776)
by Alex
09:27
created

NameTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGivenAValidNameAValidVOIsReturned() 0 11 1
1
<?php
2
3
namespace StraTDeS\VO\Tests;
4
5
use StraTDeS\VO\Name;
6
use PHPUnit\Framework\TestCase;
7
8
class NameTest extends TestCase
9
{
10
    public function testGivenAValidNameAValidVOIsReturned(): void
11
    {
12
        // Arrange
13
        $name = "John Smith";
14
15
        // Act
16
        $nameVO = Name::fromValue($name);
17
18
        // Assert
19
        $this->assertInstanceOf(Name::class, $nameVO);
20
        $this->assertEquals($name, $nameVO->value());
21
    }
22
}
23