/** * @return static */ public function withAttributeValues() { foreach ($this->entity->getAttributeValues() as $attributeValue) { $this->entityDTO->attributeValues[] = $this->dtoBuilderFactory->getAttributeValueDTOBuilder($attributeValue)->build(); } return $this; }
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())); }