Test Failed
Pull Request — master (#4)
by Miguel Ángel
04:40
created

UuidValueObjectTest::itShouldThrowsException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace PhpValueObjects\Tests\Scalar;
4
5
use PhpValueObjects\Scalar\Exception\InvalidUuidException;
6
use PhpValueObjects\Tests\BaseUnitTestCase;
7
use Ramsey\Uuid\Uuid;
8
9
class UuidValueObjectTest extends BaseUnitTestCase
10
{
11
    /**
12
     * @test
13
     */
14
    public function itShouldReturnUuid()
15
    {
16
        $uuid = new UuidValueObject($this->faker()->uuid());
17
18
        $this->assertTrue(Uuid::isValid($uuid->value()));
19
    }
20
21
    /**
22
     * @test
23
     */
24
    public function itShouldThrowsException()
25
    {
26
        $this->expectException(InvalidUuidException::class);
27
28
        new UuidValueObject($this->faker()->name);
29
    }
30
}
31