--TEST--
TokenList: replace
--EXTENSIONS--
dom
--FILE--
');
$element = $dom->documentElement;
$list = $element->classList;
var_dump($list->replace('nonexistent', 'X'));
echo $dom->saveXML(), "\n";
var_dump($list->replace('B', 'X'));
echo $dom->saveXML(), "\n";
var_dump($list->replace('C', 'X'));
echo $dom->saveXML(), "\n";
var_dump($list->replace('A', 'B'));
echo $dom->saveXML(), "\n";
var_dump($list->replace('X', 'B'));
echo $dom->saveXML(), "\n";
$list->value = 'A';
$list->replace('A', 'AA');
echo $dom->saveXML(), "\n";
?>
--EXPECT--
bool(false)
bool(true)
bool(true)
bool(true)
bool(true)