1--TEST--
2TokenList: contains errors
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = DOM\XMLDocument::createFromString('<root class="A B C"/>');
9$element = $dom->documentElement;
10$list = $element->classList;
11
12try {
13    $list->contains("\0");
14} catch (ValueError $e) {
15    echo $e->getMessage(), "\n";
16}
17
18?>
19--EXPECT--
20Dom\TokenList::contains(): Argument #1 ($token) must not contain any null bytes
21