Passed
Branch master (168fd2)
by Dariusz
06:34
created

CartDiscountTest::testCartDiscount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Plane\Shop\Tests;
4
5
use Plane\Shop\Cart;
6
use Plane\Shop\Discount\TotalPriceThresholdDiscount;
7
8
class CartDiscountTest extends \PHPUnit\Framework\TestCase
9
{
10
    public function testCartDiscount()
11
    {
12
        $cart = new Cart('USD');
13
       
14
        $cartDiscount = new TotalPriceThresholdDiscount('Discount description', $cart, [
15
            'treshold' => 14,
16
            'discount' => 0.1
17
        ]);
18
19
        $this->assertSame($cartDiscount->getDescription(), 'Discount description');
20
    }
21
}