/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/libxml/tests/bug76777.phpt
45 строк
769 B
Nikita Popov
Migrate SKIPIF -> EXTENSIONS (#7138)
11 июн 2021, 12:57
Не верифицирован
11 июн 2021, 12:57
7485978
Код
Авторство
О чём код?
--TEST-- Bug #76777 (first parameter of libxml_set_external_entity_loader callback undefined) --EXTENSIONS-- libxml dom --SKIPIF-- <?php if (getenv("SKIP_ONLINE_TESTS")) die('skip online test'); ?> --FILE-- <?php $xml=<<<EOF <?xml version="1.0"?> <test/> EOF; $xsd=<<<EOF <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:include schemaLocation="nonexistent.xsd"/> <xs:element name="test"/> </xs:schema> EOF; libxml_set_external_entity_loader(function($p,$s,$c) { var_dump($p,$s,$c); die(); }); $dom=new DOMDocument($xml); $dom->schemaValidateSource($xsd); ?> --EXPECT-- NULL string(15) "nonexistent.xsd" array(4) { ["directory"]=> NULL ["intSubName"]=> NULL ["extSubURI"]=> NULL ["extSubSystem"]=> NULL }