Completed
Push — master ( cbae82...6b14db )
by Andrii
02:38
created

SinglePriceTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
nc 1
cc 1
eloc 1
nop 0
1
<?php
2
3
namespace hiqdev\php\billing\tests\unit;
4
5
use hiqdev\php\billing\SinglePrice;
6
use hiqdev\php\billing\Target;
7
use hiqdev\php\billing\Type;
8
use hiqdev\php\units\Quantity;
9
use Money\Money;
10
11
/**
12
 * @author Andrii Vasyliev <[email protected]>
13
 */
14
class SinglePriceTest extends \PHPUnit\Framework\TestCase
15
{
16
    /**
17
     * @var SinglePrice
18
     */
19
    protected $price;
20
21
    /**
22
     * @var SimpleAction
23
     */
24
    protected $action;
25
26
    /**
27
     * @var Money
28
     */
29
    protected $money;
30
31
    protected function setUp()
32
    {
33
        $this->target   = new Target('server', 1);
34
        $this->type     = new Type('server_traf');
35
        $this->quantity = Quantity::gigabyte(10);
36
        $this->money    = Money::USD(15);
37
        $this->price    = new SinglePrice($this->target, $this->type, $this->quantity, $this->money);
38
    }
39
40
    protected function tearDown()
41
    {
42
    }
43
44
    public function testCalculateUsage()
45
    {
46
        $this->assertNull($this->price->calculateUsage(Quantity::byte(1)));
47
    }
48
}
49