Skip to content

Commit d62abcc

Browse files
committed
add test
1 parent b72175a commit d62abcc

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ext/reflection/tests/gh21768.phpt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
GH-21768: Assertion failure in ReflectionProperty::is{Readable,Writable}() on internal virtual properties
3+
--EXTENSIONS--
4+
dom
5+
--FILE--
6+
<?php
7+
8+
$rc = new ReflectionClass('DOMDocument');
9+
foreach ($rc->getProperties() as $rp) {
10+
if (!$rp->isVirtual())
11+
continue;
12+
if (!$rp->isReadable(null))
13+
die("$rp should be readable");
14+
if (!$rp->isWritable(null))
15+
die("$rp should be writable");
16+
}
17+
echo "done\n";
18+
19+
?>
20+
--EXPECT--
21+
done

0 commit comments

Comments
 (0)