@@ 31-37 (lines=7) @@ | ||
28 | $this->rate = 10; |
|
29 | } |
|
30 | ||
31 | public function testCreateAbsolute() |
|
32 | { |
|
33 | $abs = new FixedDiscount($this->value); |
|
34 | $this->assertSame($this->value, $abs->getValue()); |
|
35 | $this->assertTrue($abs->isAbsolute()); |
|
36 | $this->assertFalse($abs->isRelative()); |
|
37 | } |
|
38 | ||
39 | public function testCreateRelative() |
|
40 | { |
|
@@ 39-45 (lines=7) @@ | ||
36 | $this->assertFalse($abs->isRelative()); |
|
37 | } |
|
38 | ||
39 | public function testCreateRelative() |
|
40 | { |
|
41 | $rel = new FixedDiscount($this->rate); |
|
42 | $this->assertSame($this->rate, $rel->getValue()); |
|
43 | $this->assertTrue($rel->isRelative()); |
|
44 | $this->assertFalse($rel->isAbsolute()); |
|
45 | } |
|
46 | ||
47 | public function testAbsModifyCharge() |
|
48 | { |