1--TEST--
2TokenList: remove errors
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = DOM\XMLDocument::createFromString("<root/>");
9$list = $dom->documentElement->classList;
10
11try {
12    $list->remove("");
13} catch (DOMException $e) {
14    echo $e->getMessage(), "\n";
15}
16try {
17    $list->remove("  ");
18} catch (DOMException $e) {
19    echo $e->getMessage(), "\n";
20}
21try {
22    $list->remove("\0");
23} catch (ValueError $e) {
24    echo $e->getMessage(), "\n";
25}
26try {
27    $list->remove(0);
28} catch (TypeError $e) {
29    echo $e->getMessage(), "\n";
30}
31
32echo $dom->saveXML(), "\n";
33
34?>
35--EXPECT--
36The empty string is not a valid token
37The token must not contain any ASCII whitespace
38Dom\TokenList::remove(): Argument #1 must not contain any null bytes
39Dom\TokenList::remove(): Argument #1 must be of type string, int given
40<?xml version="1.0" encoding="UTF-8"?>
41<root/>
42