/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt
27 строк
711 B
Gina Peter Bnayard
Use "must not" instead of "cannot" wording
21 авг 2024, 23:12
21 авг 2024, 23:12
5853cdb
Код
Авторство
О чём код?
--TEST-- Test DOMDocument::loadHTMLFile when an empty string is passed --DESCRIPTION-- Verifies that an error message is showed if an empty string is passed as argument --CREDITS-- Antonio Diaz Ruiz <dejalatele@gmail.com> --EXTENSIONS-- dom --FILE-- <?php $doc = new DOMDocument(); try { $result = $doc->loadHTMLFile(""); } catch (ValueError $e) { echo $e->getMessage() . "\n"; } $doc = new DOMDocument(); try { $result = $doc->loadHTMLFile("text.html\0something"); } catch (ValueError $e) { echo $e->getMessage() . "\n"; } ?> --EXPECT-- DOMDocument::loadHTMLFile(): Argument #1 ($filename) must not be empty DOMDocument::loadHTMLFile(): Argument #1 ($filename) must not contain any null bytes