1--TEST--
2TokenList: change attribute
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = DOM\XMLDocument::createFromString('<root class="a b c"><child/></root>');
9$element = $dom->documentElement;
10$list = $element->classList;
11
12var_dump($list);
13
14$element->attributes[0]->value = 'd';
15
16var_dump($list);
17
18$list->value = 'e f g';
19
20var_dump($list);
21
22?>
23--EXPECT--
24object(Dom\TokenList)#3 (2) {
25  ["length"]=>
26  int(3)
27  ["value"]=>
28  string(5) "a b c"
29}
30object(Dom\TokenList)#3 (2) {
31  ["length"]=>
32  int(1)
33  ["value"]=>
34  string(1) "d"
35}
36object(Dom\TokenList)#3 (2) {
37  ["length"]=>
38  int(3)
39  ["value"]=>
40  string(5) "e f g"
41}
42