| Conditions | 1 |
| Paths | 1 |
| Total Lines | 33 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function testCreateFromArray() |
||
| 11 | { |
||
| 12 | $cardId = '1000'; |
||
| 13 | $name = 'name'; |
||
| 14 | $listBefore = 'listBefore'; |
||
| 15 | $listAfter = 'listAfter'; |
||
| 16 | $date = '2019-04-29 00:00:00'; |
||
| 17 | |||
| 18 | $data = [ |
||
| 19 | 'data' => [ |
||
| 20 | 'card' => [ |
||
| 21 | 'id' => $cardId, |
||
| 22 | 'name' => $name, |
||
| 23 | ], |
||
| 24 | 'listBefore' => [ |
||
| 25 | 'name' => $listBefore, |
||
| 26 | ], |
||
| 27 | 'listAfter' => [ |
||
| 28 | 'name' => $listAfter, |
||
| 29 | ] |
||
| 30 | ], |
||
| 31 | 'date' => $date |
||
| 32 | ]; |
||
| 33 | |||
| 34 | $cardHistory = HistoryCard::createFromArray($data); |
||
| 35 | |||
| 36 | $this->assertEquals($cardId, $cardHistory->getId()); |
||
| 37 | $this->assertEquals($name, $cardHistory->getTitle()); |
||
| 38 | $this->assertEquals($listBefore, $cardHistory->getFrom()); |
||
| 39 | $this->assertEquals($listAfter, $cardHistory->getTo()); |
||
| 40 | $this->assertEquals($date, $cardHistory->getDate()); |
||
| 41 | |||
| 42 | } |
||
| 43 | } |