| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function purchaseHistory() |
||
| 26 | { |
||
| 27 | $initialPurchases = 2; |
||
| 28 | $purchaseHistory = new PurchaseHistory( |
||
| 29 | '', |
||
| 30 | '', |
||
| 31 | [$this->getGeneratedPurchase(), $this->getGeneratedPurchase(), new stdClass()] |
||
| 32 | ); |
||
| 33 | |||
| 34 | self::assertEquals($initialPurchases, count($purchaseHistory->getPurchases())); |
||
| 35 | |||
| 36 | $purchase = $this->getGeneratedPurchase(); |
||
| 37 | $purchaseHistory ->addPurchase($purchase); |
||
| 38 | |||
| 39 | self::assertEquals(($initialPurchases +1), count($purchaseHistory->getPurchases())); |
||
| 40 | |||
| 41 | $purchaseHistory ->removePurchase($purchase); |
||
| 42 | |||
| 43 | self::assertEquals($initialPurchases, count($purchaseHistory->getPurchases())); |
||
| 44 | } |
||
| 45 | |||
| 69 |