mirror of
https://github.com/php/php-src.git
synced 2024-10-19 07:22:40 +00:00
24 lines
519 B
Plaintext
24 lines
519 B
Plaintext
|
--TEST--
|
||
|
Test inserting data into a DOMComment basic test
|
||
|
--CREDITS--
|
||
|
Andrew Larssen <al@larssen.org>
|
||
|
London TestFest 2008
|
||
|
--SKIPIF--
|
||
|
<?php require_once('skipif.inc'); ?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
//offset to large
|
||
|
$dom = new DomDocument();
|
||
|
$comment = $dom->createComment('test-comment');
|
||
|
try {
|
||
|
$comment->insertData(999,'-inserted');
|
||
|
} catch (DOMException $e ) {
|
||
|
if ($e->getMessage() == 'Index Size Error'){
|
||
|
echo "Throws DOMException for offset too large\n";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Throws DOMException for offset too large
|