1--TEST--
2Test replacing data into a DOMComment basic test
3--CREDITS--
4Andrew Larssen <al@larssen.org>
5London TestFest 2008
6--EXTENSIONS--
7dom
8--FILE--
9<?php
10
11//Negative offset
12$dom = new DomDocument();
13$comment = $dom->createComment('test-comment');
14try {
15  $comment->replaceData(-1,4,'-inserted');
16} catch (DOMException $e ) {
17  if ($e->getMessage() == 'Index Size Error'){
18    echo "Throws DOMException for -ve offset\n";
19  }
20}
21
22?>
23--EXPECT--
24Throws DOMException for -ve offset
25