Total Complexity | 6 |
Total Lines | 66 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class TaxRateTest extends \PHPUnit\Framework\TestCase |
||
8 | { |
||
9 | /** |
||
10 | * @dataProvider provideCompare |
||
11 | * |
||
12 | * @param TaxRate $a |
||
13 | * @param TaxRate $b |
||
14 | * @param int $expected |
||
15 | */ |
||
16 | public function testCompare(TaxRate $a, TaxRate $b, $expected) |
||
20 | } |
||
21 | |||
22 | public function provideCompare() |
||
34 | ]; |
||
35 | } |
||
36 | |||
37 | public function testEquals() |
||
38 | { |
||
39 | $sut = new TaxRate(20); |
||
40 | $taxrate1 = new TaxRate(20); |
||
41 | $taxrate2 = new TaxRate(10); |
||
42 | |||
43 | self::assertTrue($sut->equals($taxrate1)); |
||
44 | self::assertFalse($sut->equals($taxrate2)); |
||
45 | } |
||
46 | |||
47 | |||
48 | public function testLessThan() |
||
49 | { |
||
50 | $sut = new TaxRate(20); |
||
51 | $taxrate1 = new TaxRate(25); |
||
52 | $taxrate2 = new TaxRate(10); |
||
53 | |||
54 | self::assertTrue($sut->lessThan($taxrate1)); |
||
55 | self::assertFalse($sut->lessThan($taxrate2)); |
||
56 | } |
||
57 | |||
58 | public function testGreaterThan() |
||
59 | { |
||
60 | $sut = new TaxRate(20); |
||
61 | $taxrate1 = new TaxRate(10); |
||
62 | $taxrate2 = new TaxRate(25); |
||
63 | |||
64 | self::assertTrue($sut->greaterThan($taxrate1)); |
||
65 | self::assertFalse($sut->greaterThan($taxrate2)); |
||
66 | } |
||
67 | |||
68 | public function testCreate() |
||
73 | } |
||
74 | } |
||
75 |