/** * @covers ::performUnfreeze * @covers ::unfreezeItems */ public function testUnfreeze() { $basket = new Basket(['currency' => 'BGN', 'value' => 2000, 'isFrozen' => true]); $item1 = $this->getMock(__NAMESPACE__ . '\\ProductItem', ['unfreeze']); $item1->expects($this->once())->method('unfreeze'); $item2 = $this->getMock(__NAMESPACE__ . '\\ProductItem', ['unfreeze']); $item2->expects($this->once())->method('unfreeze'); $basket->getItems()->add($item1)->add($item2); $basket->unfreeze(); $this->assertEquals(0, $basket->value); }