Test Failed
Push — master ( 988c49...052020 )
by Davis
01:52
created

TestAuthor::shouldConstructAuthor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 7
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: davis
5
 * Date: 7/23/17
6
 * Time: 7:25 PM
7
 */
8
9
namespace DavisPeixoto\BlogCore\Tests\Entity;
10
11
use DateTime;
12
use DavisPeixoto\BlogCore\Entity\Author;
13
use PHPUnit_Framework_TestCase;
14
use Ramsey\Uuid\Uuid;
15
16
class TestAuthor extends PHPUnit_Framework_TestCase
17
{
18
    /**
19
     * @param $uuid
20
     * @param $name
21
     * @param $email
22
     * @param $bio
23
     * @param $birthdate
24
     * @param $expected
25
     * @param $message
26
     * @dataProvider authorConstructorProvider
27
     */
28
    public function shouldConstructAuthor($uuid, $name, $email, $bio, $birthdate, $expected, $message)
29
    {
30
        $author = new Author($uuid, $name, $email, $bio, $birthdate);
31
        $this->assertInstanceOf($expected, $author, $message);
32
    }
33
34
    public function authorConstructorProvider()
35
    {
36
        return [
37
            [Uuid::uuid4(), 'Davis', '[email protected]', 'Some string', new DateTime(), Author::class, 'Regular test'],
38
        ];
39
    }
40
}
41