php-src/ext/dom/tests/DOMAttr_ownerElement_error_001.phpt
Eric Stewart 30cdf25f22 New test: DOMAttr read $name property.
New test: DOMAttr read $ownerElement with null parent.
New test: DOMAttr write non-string $value property
New test: DOMCDATASection __construct() with no arguments.
New test: DOMCharacterData - Invalid State Error when getting data out of content.
2009-05-23 01:42:37 +00:00

24 lines
552 B
PHP
Executable File

--TEST--
Read $ownerElement with null parent.
--CREDITS--
Travis Pew
# TestFest Atlanta 2009-05-14
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$document = new DOMDocument;
$root = $document->createElement('root');
$document->appendChild($root);
$attr = $root->setAttribute('category', 'books');
$document->removeChild($root);
$root = null;
var_dump($attr->ownerElement);
?>
--EXPECTF--
Warning: Couldn't fetch DOMAttr. Node no longer exists in %s on line %d
Notice: Undefined property: DOMAttr::$ownerElement in %s on line %d
NULL