1--TEST-- 2TokenList: contains 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 12echo "---\n"; 13 14var_dump($list->contains('')); 15var_dump($list->contains('A')); 16var_dump($list->contains('B')); 17var_dump($list->contains('C')); 18 19echo "---\n"; 20 21var_dump($list->contains(' A')); 22var_dump($list->contains('B ')); 23var_dump($list->contains(' C ')); 24 25echo "---\n"; 26 27var_dump($list->contains('a')); 28var_dump($list->contains('b')); 29var_dump($list->contains('c')); 30 31$element->setAttribute('class', 'D'); 32 33echo "---\n"; 34 35var_dump($list->contains('A')); 36var_dump($list->contains('B')); 37var_dump($list->contains('C')); 38var_dump($list->contains('D')); 39 40echo "---\n"; 41 42$list->value = 'E'; 43var_dump($list->contains('D')); 44var_dump($list->contains('E')); 45 46?> 47--EXPECT-- 48--- 49bool(false) 50bool(true) 51bool(true) 52bool(true) 53--- 54bool(false) 55bool(false) 56bool(false) 57--- 58bool(false) 59bool(false) 60bool(false) 61--- 62bool(false) 63bool(false) 64bool(false) 65bool(true) 66--- 67bool(false) 68bool(true) 69