1--TEST-- 2TokenList: remove 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = DOM\XMLDocument::createFromString('<root class="test1 test2"/>'); 9$list = $dom->documentElement->classList; 10 11$list->remove(); 12$list->remove('test1'); 13 14echo $dom->saveXML(), "\n"; 15 16$list->remove('nope'); 17 18echo $dom->saveXML(), "\n"; 19 20$list->remove('test2'); 21 22echo $dom->saveXML(), "\n"; 23 24$list->value = 'test3 test4'; 25$list->remove('test4'); 26 27echo $dom->saveXML(), "\n"; 28 29?> 30--EXPECT-- 31<?xml version="1.0" encoding="UTF-8"?> 32<root class="test2"/> 33<?xml version="1.0" encoding="UTF-8"?> 34<root class="test2"/> 35<?xml version="1.0" encoding="UTF-8"?> 36<root class=""/> 37<?xml version="1.0" encoding="UTF-8"?> 38<root class="test3"/> 39