''); ob_start(); include $root.'/web/ajax/modals/'.$modal.'.php'; $html = ob_get_clean(); check("$modal: key is not emitted as markup", strpos($html, ' 'a&b'); ob_start(); include $root.'/web/ajax/modals/'.$modal.'.php'; $html = ob_get_clean(); check("$modal: a plain key is still shown", strpos($html, 'a&b') !== false); $_REQUEST = array('key' => array('x')); ob_start(); include $root.'/web/ajax/modals/'.$modal.'.php'; $html = ob_get_clean(); check("$modal: an array key falls back to the default", strpos($html, 'Confirm') !== false); } echo "\n$tests tests, $failures failures\n"; exit($failures ? 1 : 0);