Skip to content

Commit

Permalink
Fix (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma authored Jun 5, 2020
1 parent 50fa2e3 commit 724fc2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ValueObject/CartItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function addTaxRate(float $taxRate): CartItem

$this->taxRate = $taxRate;
if (!$this->taxTableSelector) {
$this->taxTableSelector = $taxRate;
$this->taxTableSelector = (string)$taxRate;
}
return $this;
}
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/ValueObject/CartItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public function testAddTaxRate()
$cartItem = new CartItem();
$cartItem->addTaxRate($taxRate);
$this->assertEquals($taxRate, $cartItem->getTaxRate());
$this->assertEquals($taxRate, $cartItem->getTaxTableSelector());
$this->assertNotSame($taxRate, $cartItem->getTaxTableSelector());
}

/**
Expand Down

0 comments on commit 724fc2f

Please sign in to comment.