mirror of
https://github.com/php/php-src.git
synced 2024-10-05 00:36:17 +00:00
20 lines
398 B
PHP
20 lines
398 B
PHP
--TEST--
|
|
tidyNode::getParent()
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("tidy")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
$x = tidy_parse_string("<body><div>Content</div></body>");
|
|
var_dump($x->body()->child[0]->name);
|
|
var_dump($x->body()->child[0]->getParent()->name);
|
|
var_dump($x->root()->getParent());
|
|
?>
|
|
--EXPECT--
|
|
string(3) "div"
|
|
string(4) "body"
|
|
NULL
|
|
--UEXPECT--
|
|
unicode(3) "div"
|
|
unicode(4) "body"
|
|
NULL
|