コード例 #1
0
ファイル: ProductTest.php プロジェクト: inklabs/kommerce-core
 public function testGetPrice()
 {
     $pricing = $this->dummyData->getPricing();
     $product = new Product();
     $product->setQuantity(1);
     $this->assertTrue($product->getPrice($pricing) instanceof Price);
 }
コード例 #2
0
 /**
  * @param PricingInterface $pricing
  * @return static
  */
 public function withPrice(PricingInterface $pricing)
 {
     $this->entityDTO->price = $this->dtoBuilderFactory->getPriceDTOBuilder($this->entity->getPrice($pricing))->withAllData()->build();
     return $this;
 }