1--TEST--
2Dom\Text:splitText() edge case
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7$dom = Dom\HTMLDocument::createEmpty();
8$text = $dom->createTextNode('Hello World!');
9var_dump($text->splitText(5)->wholeText);
10try {
11    var_dump($text->splitText(-1));
12} catch (ValueError $e) {
13  echo $e->getMessage(), "\n";
14}
15try {
16    var_dump($text->splitText(200));
17} catch (DOMException $e) {
18  echo $e->getMessage(), "\n";
19}
20?>
21--EXPECT--
22string(7) " World!"
23Dom\Text::splitText(): Argument #1 ($offset) must be greater than or equal to 0
24Index Size Error
25