/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/xsl/tests/req30622_errors.phpt
59 строк
2 KB
Niels Dossche
Implement request #30622: make $namespace parameter functional
30 сен 2024, 21:34
Не верифицирован
30 сен 2024, 21:34
daa94cf
Код
Авторство
О чём код?
--TEST-- Request #30622 (XSLT: xsltProcessor->setParameter() cannot set namespace URI) - error cases --EXTENSIONS-- xsl --CREDITS-- Based on a test by <ishikawa at arielworks dot com> --FILE-- <?php $proc = new XSLTProcessor(); try { $proc->setParameter("urn:x", "{urn:a}x", ""); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { $proc->setParameter("urn:x", "a:b", ""); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { $proc->getParameter("urn:x", "{urn:a}x"); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { $proc->getParameter("urn:x", "a:b"); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { $proc->removeParameter("urn:x", "{urn:a}x"); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } try { $proc->removeParameter("urn:x", "a:b"); } catch (ValueError $e) { echo $e->getMessage(), "\n"; } // Edge cases, should work $proc->setParameter("urn:x", ":b", ""); $proc->setParameter("urn:x", ":", ""); ?> --EXPECT-- XSLTProcessor::setParameter(): Argument #2 ($name) must not use clark notation when argument #1 ($namespace) is not empty XSLTProcessor::setParameter(): Argument #2 ($name) must not be a QName when argument #1 ($namespace) is not empty XSLTProcessor::getParameter(): Argument #2 ($name) must not use clark notation when argument #1 ($namespace) is not empty XSLTProcessor::getParameter(): Argument #2 ($name) must not be a QName when argument #1 ($namespace) is not empty XSLTProcessor::removeParameter(): Argument #2 ($name) must not use clark notation when argument #1 ($namespace) is not empty XSLTProcessor::removeParameter(): Argument #2 ($name) must not be a QName when argument #1 ($namespace) is not empty