Skip to content

Commit f6e8299

Browse files
authored
Merge pull request #29 from bavix/master
fix phpunit
2 parents 88ea205 + e07a438 commit f6e8299

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/TaxTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public function testPay(): void
2323
'quantity' => 1,
2424
]);
2525

26-
$balance = (int) ($product->price +
27-
$product->price * $product->getFeePercent() / 100);
26+
$fee = (int) ($product->price * $product->getFeePercent() / 100);
27+
$balance = $product->price + $fee;
2828

2929
$this->assertEquals($buyer->balance, 0);
3030
$buyer->deposit($balance);
@@ -43,6 +43,7 @@ public function testPay(): void
4343
$this->assertEquals($withdraw->amount, -$balance);
4444
$this->assertEquals($deposit->amount, $product->getAmountProduct());
4545
$this->assertNotEquals($deposit->amount, $withdraw->amount);
46+
$this->assertEquals($transfer->fee, $fee);
4647

4748
$buyer->refund($product);
4849
$this->assertEquals($buyer->balance, $deposit->amount);

0 commit comments

Comments
 (0)