Example #1
0
 /**
  * @covers ::key
  * @covers ::setKey
  * @uses Blesta\Pricing\Type\UnitPrice::__construct
  * @uses Blesta\Pricing\Type\UnitPrice::setPrice
  * @uses Blesta\Pricing\Type\UnitPrice::setQty
  */
 public function testKey()
 {
     // No key is null
     $price = 5.0;
     $unit_price = new UnitPrice($price);
     $this->assertNull($unit_price->key());
     // Set a key
     $key = 'id';
     $unit_price->setKey($key);
     $this->assertEquals($key, $unit_price->key());
 }