1--TEST--
2Test replacing data into a DOMComment basic test
3--CREDITS--
4Andrew Larssen <al@larssen.org>
5London TestFest 2008
6--SKIPIF--
7<?php require_once('skipif.inc'); ?>
8--FILE--
9<?php
10
11$dom = new DomDocument();
12$comment = $dom->createComment('test-comment');
13$comment->replaceData(4,1,'replaced');
14$dom->appendChild($comment);
15echo $dom->saveXML();
16
17// Replaces rest of string if count is greater than length of existing string
18$dom = new DomDocument();
19$comment = $dom->createComment('test-comment');
20$comment->replaceData(0,50,'replaced');
21$dom->appendChild($comment);
22echo $dom->saveXML();
23
24?>
25--EXPECTF--
26<?xml version="1.0"?>
27<!--testreplacedcomment-->
28<?xml version="1.0"?>
29<!--replaced-->
30