CycleTimeColumnTest::testCreateFromCardHistory()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
}