This repository has been archived by the owner on Apr 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
LodgingChecklistTest.php
59 lines (42 loc) · 1.83 KB
/
LodgingChecklistTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
namespace OpgTest\Core\Model\Entity\Document;
use Opg\Core\Model\Entity\Document\Document;
use Opg\Core\Model\Entity\Document\LodgingChecklist;
class LodgingChecklistTest extends \PHPUnit_Framework_TestCase
{
/** @var LodgingChecklist */
protected $checklist;
public function setUp()
{
$this->checklist = new LodgingChecklist();
}
public function testSetUp()
{
$this->assertTrue($this->checklist instanceof LodgingChecklist);
}
public function testGetSetDirection()
{
$expected = 'Outgoing';
$this->assertNotEquals($expected, $this->checklist->getDirection());
$this->assertEquals($expected, $this->checklist->setDirection($expected)->getDirection());
$this->assertEquals(Document::DIRECTION_INTERNAL, $this->checklist->setDirection(Document::DIRECTION_INTERNAL)->getDirection());
}
public function testGetSetTotalAssets()
{
$expected = 1024.00;
$this->assertEmpty($this->checklist->getTotalAssets());
$this->assertTrue($this->checklist->setTotalAssets($expected) instanceof LodgingChecklist);
$this->assertEquals($expected, $this->checklist->getTotalAssets());
}
public function testGetSetStartEndDates()
{
$expectedStart = new \DateTime('1970-10-01');
$expectedEnd = new \DateTime('1970-12-31');
$this->assertEmpty($this->checklist->getStartDate());
$this->assertEmpty($this->checklist->getEndDate());
$this->assertTrue($this->checklist->setStartDate($expectedStart) instanceof LodgingChecklist);
$this->assertEquals($expectedStart, $this->checklist->getStartDate());
$this->assertTrue($this->checklist->setEndDate($expectedEnd) instanceof LodgingChecklist);
$this->assertEquals($expectedEnd, $this->checklist->getEndDate());
}
}