--TEST--
TokenList: toggle
--EXTENSIONS--
dom
--FILE--
');
$element = $dom->documentElement;
$list = $element->classList;
echo "--- Toggle A (forced add) ---\n";
var_dump($list->toggle("A", true));
echo $dom->saveXML(), "\n";
echo "--- Toggle A (not forced) ---\n";
var_dump($list->toggle("A"));
echo $dom->saveXML(), "\n";
echo "--- Toggle A (forced remove) ---\n";
var_dump($list->toggle("A", false));
echo $dom->saveXML(), "\n";
echo "--- Toggle B (forced remove) ---\n";
var_dump($list->toggle("B", false));
echo $dom->saveXML(), "\n";
echo "--- Toggle D ---\n";
var_dump($list->toggle("D"));
echo $dom->saveXML(), "\n";
echo "--- Toggle C ---\n";
var_dump($list->toggle("C"));
echo $dom->saveXML(), "\n";
echo "--- Toggle E ---\n";
$list->value = 'E';
$list->toggle('E');
echo $dom->saveXML(), "\n";
?>
--EXPECT--
--- Toggle A (forced add) ---
bool(true)
--- Toggle A (not forced) ---
bool(false)
--- Toggle A (forced remove) ---
bool(false)
--- Toggle B (forced remove) ---
bool(false)
--- Toggle D ---
bool(true)
--- Toggle C ---
bool(false)
--- Toggle E ---