CycleTimeColumnTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreateFromCardHistory() 0 15 1
1
<?php
2
3
4
namespace Tests\ValueObject;
5
6
7
use PHPUnit\Framework\TestCase;
8
use TrelloCycleTime\ValueObject\HistoryCard;
9
use TrelloCycleTime\ValueObject\CycleTime;
10
11
class CycleTimeColumnTest  extends TestCase
12
{
13
    public function testCreateFromCardHistory()
14
    {
15
        $from = 'fromColumn';
16
        $to = 'toColumn';
17
18
        $cardHistory = $this->prophesize(HistoryCard::class);
19
        $cardHistory->getFrom()->willReturn($from);
20
        $cardHistory->getTo()->willReturn($to);
21
22
        $cycleTimeColumn = CycleTime::createFromCardHistory($cardHistory->reveal());
23
24
        $this->assertEquals($from, $cycleTimeColumn->getFrom());
25
        $this->assertEquals($to, $cycleTimeColumn->getTo());
26
        $this->assertNull($cycleTimeColumn->getDays());
27
    }
28
}