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
/
LineItemTest.php
49 lines (41 loc) · 1.5 KB
/
LineItemTest.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
<?php
namespace OpgTest\Core\Model\Entity\LineItem;
use Opg\Core\Model\Entity\Document\LodgingChecklist;
use Opg\Core\Model\Entity\LineItem\LineItem;
class LineItemTest extends \PHPUnit_Framework_TestCase
{
/** @var LineItem */
protected $lineItem;
public function setUp()
{
$this->lineItem = new LineItem();
}
public function testGetSetId()
{
$expected = 1;
$this->assertEmpty($this->lineItem->getId());
$this->assertTrue($this->lineItem->setId($expected) instanceof LineItem);
$this->assertEquals($expected, $this->lineItem->getId());
}
public function testGetSetDocument()
{
$expected = new LodgingChecklist();
$this->assertEmpty($this->lineItem->getDocument());
$this->assertTrue($this->lineItem->setDocument($expected) instanceof LineItem);
$this->assertEquals($expected, $this->lineItem->getDocument());
}
public function testGetSetLineItemName()
{
$expected = 'line item name';
$this->assertEmpty($this->lineItem->getName());
$this->assertTrue($this->lineItem->setName($expected) instanceof LineItem);
$this->assertEquals($expected, $this->lineItem->getName());
}
public function testGetSetLineItemValue()
{
$expected = 2500.34;
$this->assertEmpty($this->lineItem->getValue());
$this->assertTrue($this->lineItem->setValue($expected) instanceof LineItem);
$this->assertEquals($expected, $this->lineItem->getValue());
}
}