Ejemplo n.º 1
0
 /**
  * @param PricingInterface $pricing
  * @return static
  */
 public function withOptionProducts(PricingInterface $pricing)
 {
     foreach ($this->entity->getOptionProducts() as $optionProduct) {
         $this->entityDTO->optionProducts[] = $this->dtoBuilderFactory->getOptionProductDTOBuilder($optionProduct)->withProduct($pricing)->build();
     }
     return $this;
 }
Ejemplo n.º 2
0
 public function testCreateDefaults()
 {
     $option = new Option();
     $this->assertSame(0, count($option->getTags()));
     $this->assertSame(0, count($option->getOptionProducts()));
     $this->assertSame(0, count($option->getOptionValues()));
     $this->assertTrue($option->getType()->isSelect());
 }