Exemplo n.º 1
0
 /**
  * @covers ::isFullyRefunded
  */
 public function testIsFullyRefunded()
 {
     $storePurchase = new StorePurchase(['value' => 1000, 'isFrozen' => true]);
     $this->assertFalse($storePurchase->isFullyRefunded());
     $storePurchase->getRefunds()->add(new Refund(['value' => 100]));
     $this->assertFalse($storePurchase->isFullyRefunded());
     $storePurchase->getRefunds()->add(new Refund(['value' => 900]));
     $this->assertTrue($storePurchase->isFullyRefunded());
 }