Skip to content

Commit 56a5d28

Browse files
committed
Test and fixture
1 parent e649499 commit 56a5d28

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

tests/Writer/VariantsTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use DemandwareXml\Test\FixtureHelper;
66
use DemandwareXml\Writer\Entity\Variant;
77
use DemandwareXml\Writer\Xml\XmlWriter;
8+
use DemandwareXml\XmlException;
89
use PHPUnit\Framework\TestCase;
910

1011
class VariantsTest extends TestCase
@@ -14,8 +15,9 @@ class VariantsTest extends TestCase
1415
public function test_variants_xml(): void
1516
{
1617
$variants = [
17-
'colour' => ['red' => 'Red', 'blue' => 'Blue'],
18-
'height' => ['H1' => 'Grande', 'H2' => 'Tall'],
18+
'colour' => ['red' => 'Red', 'blue' => 'Blue'],
19+
'height' => ['H1' => 'Grande', 'H2' => 'Tall'],
20+
'description' => ['body' => 'Experience the UltraComfort Memory Foam Pillow, designed to support your neck and head with premium memory foam for ultimate comfort. The breathable, hypoallergenic cover keeps you cool all night. Perfect for any sleeping position, it promotes restful, refreshing sleep.'],
1921
];
2022

2123
$xml = new XmlWriter;

tests/fixtures/variants.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,11 @@
2020
</variation-attribute-value>
2121
</variation-attribute-values>
2222
</variation-attribute>
23+
<variation-attribute attribute-id="description" variation-attribute-id="description">
24+
<variation-attribute-values>
25+
<variation-attribute-value value="body">
26+
<display-value xml:lang="x-default">Experience the UltraComfort Memory Foam Pillow, designed to support your neck and head with premium memory foam for ultimate comfort. The breathable, hypoallergenic cover keeps you cool all night. Perfect for any sleeping position, it promotes restful, ref</display-value>
27+
</variation-attribute-value>
28+
</variation-attribute-values>
29+
</variation-attribute>
2330
</catalog>

0 commit comments

Comments
 (0)