public function testCreate() { $product = $this->dummyData->getProduct(); $attribute = $this->dummyData->getAttribute(); $attributeValue = $this->dummyData->getAttributeValue(); $productAttribute = new ProductAttribute($product, $attribute, $attributeValue); $this->assertSame($product, $productAttribute->getProduct()); $this->assertSame($attribute, $productAttribute->getAttribute()); $this->assertSame($attributeValue, $productAttribute->getAttributeValue()); }
/** * @return static */ public function withAttribute() { $this->entityDTO->attribute = $this->dtoBuilderFactory->getAttributeDTOBuilder($this->entity->getAttribute())->build(); return $this; }