diff options
Diffstat (limited to 'ext/dom/tests/DOMComment_insertData_error2.phpt')
-rw-r--r-- | ext/dom/tests/DOMComment_insertData_error2.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/dom/tests/DOMComment_insertData_error2.phpt b/ext/dom/tests/DOMComment_insertData_error2.phpt new file mode 100644 index 0000000..d2affa8 --- /dev/null +++ b/ext/dom/tests/DOMComment_insertData_error2.phpt @@ -0,0 +1,24 @@ +--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
\ No newline at end of file |