Skip to content

Commit

Permalink
Úprava testů a fix pro statickou analýzu
Browse files Browse the repository at this point in the history
  • Loading branch information
fifal authored and soukicz committed Aug 13, 2019
1 parent 1524e82 commit 55cae4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CartItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CartItem {
protected $id, $name;

/**
* @var float
* @var float|NULL
*/
protected $unitPrice;
/**
Expand Down Expand Up @@ -49,7 +49,7 @@ public function setName($name) {
}

/**
* @return float
* @return float|NULL
*/
public function getUnitPrice() {
return $this->unitPrice;
Expand Down
9 changes: 9 additions & 0 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ function testOrderItems() {
->addCartItem((new CartItem)
->setId('ABC2')
->setUnitPrice(2000)
)
->addCartItem((new CartItem)
->setId('ABC3')
->setUnitPrice(0)
);

$request = $client->createRequest($order);
Expand All @@ -48,6 +52,11 @@ function testOrderItems() {
'itemId' => 'ABC2',
'unitPrice' => 2000,
'quantity' => 1,
],
[
'itemId' => 'ABC3',
'unitPrice' => 0,
'quantity' => 1,
]
]
], $data);
Expand Down

0 comments on commit 55cae4c

Please sign in to comment.