8000 [VarDumper] Fix `DOMCaster` test dumps · symfony/symfony@4201dde · GitHub
[go: up one dir, main page]

Skip to content

Commit 4201dde

Browse files
[VarDumper] Fix DOMCaster test dumps
1 parent fe822c5 commit 4201dde

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

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

Lines changed: 25 additions & 2 deletions
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)
0