Skip to content

Commit 24a1a25

Browse files
committed
minor #58277 [VarDumper] Fix DOMCaster test dumps (alexandre-daubois)
This PR was merged into the 7.1 branch. Discussion ---------- [VarDumper] Fix `DOMCaster` test dumps | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT cc `@xabbuh` Commits ------- 4201dde [VarDumper] Fix `DOMCaster` test dumps
2 parents fe822c5 + 4201dde commit 24a1a25

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

src/Symfony/Component/VarDumper/Tests/Caster/DOMCasterTest.php

+25-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ public function testCastModernText()
170170
);
171171
}
172172

173-
public function testCastAttr()
173+
/**
174+
* @requires PHP < 8.4
175+
*/
176+
public function testCastAttrPriorToPhp84()
174177
{
175178
$attr = new \DOMAttr('attr', 'value');
176179

@@ -187,6 +190,26 @@ public function testCastAttr()
187190
);
188191
}
189192

193+
/**
194+
* @requires PHP 8.4
195+
*/
196+
public function testCastAttr()
197+
{
198+
$attr = new \DOMAttr('attr', 'value');
199+
200+
$this->assertDumpMatchesFormat(<<<'EODUMP'
201+
DOMAttr {%A
202+
+name: ? string
203+
+specified: ? bool
204+
+value: ? string
205+
+ownerElement: ? ?DOMElement
206+
+schemaTypeInfo: ? mixed
207+
}
208+
EODUMP,
209+
$attr
210+
);
211+
}
212+
190213
/**
191214
* @requires PHP 8.4
192215
*/
@@ -199,7 +222,7 @@ public function testCastModernAttr()
199222
+name: ? string
200223
+value: ? string
201224
+ownerElement: ? ?Dom\Element
202-
+specified: true
225+
+specified: ? bool
203226
}
204227
EODUMP,
205228
$attr

0 commit comments

Comments
 (0)