Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4201dde

Browse filesBrowse files
[VarDumper] Fix DOMCaster test dumps
1 parent fe822c5 commit 4201dde
Copy full SHA for 4201dde

File tree

1 file changed

+25
-2
lines changed
Filter options

1 file changed

+25
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Tests/Caster/DOMCasterTest.php
+25-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.