/** * @test */ public function canGetContentAsXmlForSimpleAttribute() { $this->assertEquals(0, $this->product->getAttributeCount()); $attribute = new ProductAttribute(); $attribute->setType(ProductAttribute::TYPE_STRING); $attribute->addValue("foo"); $attribute->setName('test'); $this->product->addAttribute($attribute); $expectedNode = '<attribute name="test" type="string"> <value>foo</value> </attribute>'; $this->assertContainsXmlSnipped($expectedNode, $this->product->getContent()); }