Skip to content

Commit 9182059

Browse files
committed
patch
1 parent 88adb42 commit 9182059

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

tests/ProductTest.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,15 @@ public function getBuyer(): Buyer
1717
return factory(Buyer::class)->create();
1818
}
1919

20-
/**
21-
* @return Item
22-
*/
23-
public function getItem(): Item
24-
{
25-
return factory(Item::class)->create();
26-
}
27-
2820
/**
2921
* @return void
3022
*/
3123
public function testPay(): void
3224
{
3325
$buyer = $this->getBuyer();
34-
$product = $this->getItem();
26+
$product = factory(Item::class)->create([
27+
'quantity' => 1,
28+
]);
3529
$this->assertEquals($buyer->balance, 0);
3630
$buyer->deposit($product->price);
3731
$this->assertEquals($buyer->balance, $product->price);

0 commit comments

Comments
 (0)