Пример #1
0
 /**
  * @return static
  */
 public function withAttributeValues()
 {
     foreach ($this->entity->getAttributeValues() as $attributeValue) {
         $this->entityDTO->attributeValues[] = $this->dtoBuilderFactory->getAttributeValueDTOBuilder($attributeValue)->build();
     }
     return $this;
 }
Пример #2
0
 public function testCreateDefaults()
 {
     $attribute = new Attribute();
     $this->assertSame(null, $attribute->getName());
     $this->assertSame(null, $attribute->getDescription());
     $this->assertSame(null, $attribute->getSortOrder());
     $this->assertSame(0, count($attribute->getAttributeValues()));
 }