Completed
Push — master ( f0708c...690234 )
by Gorka
02:59
created

ChangeParentTaskCommandSpec   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_can_be_changed_parent_task_with_basic_info() 0 8 1
A it_can_be_created_with_basic_info_and_parent() 0 7 1
1
<?php
2
3
/*
4
 * This file is part of the Kreta package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Spec\Kreta\TaskManager\Application\Project\Task;
14
15
use Kreta\TaskManager\Application\Project\Task\ChangeParentTaskCommand;
16
use PhpSpec\ObjectBehavior;
17
18
class ChangeParentTaskCommandSpec extends ObjectBehavior
19
{
20
    function it_can_be_changed_parent_task_with_basic_info()
21
    {
22
        $this->beConstructedWith('task-id', 'changer-id');
23
        $this->shouldHaveType(ChangeParentTaskCommand::class);
24
        $this->id()->shouldReturn('task-id');
25
        $this->changerId()->shouldReturn('changer-id');
26
        $this->parentId()->shouldReturn(null);
27
    }
28
29
    function it_can_be_created_with_basic_info_and_parent()
30
    {
31
        $this->beConstructedWith('task-id', 'changer-id', 'parent-id');
32
        $this->id()->shouldReturn('task-id');
33
        $this->changerId()->shouldReturn('changer-id');
34
        $this->parentId()->shouldReturn('parent-id');
35
    }
36
}
37