summaryrefslogtreecommitdiff
path: root/ext/xml/tests
Commit message (Collapse)AuthorAgeFilesLines
* Rename XmlParser to XMLParser for consistency with XMLWriter/XMLReaderGeorge Peter Banyard2020-11-303-4/+4
|
* Throw warning for failed object to int/float conversionNikita Popov2020-09-211-1/+1
| | | | | | We previously couldn't increase the error level here because it was coupled to comparison handling. This is no longer the case in PHP 8.
* Run tidyNikita Popov2020-09-188-8/+8
| | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* Move custom type checks to ZPPMáté Kocsis2020-09-022-4/+4
| | | | Closes GH-6034
* Add many missing closing PHP tags to testsMáté Kocsis2020-08-091-0/+1
| | | | Closes GH-5958
* Promote warnings to exceptions in ext/gettext, ext/sysvmsg and ext/xmlMáté Kocsis2020-08-034-14/+27
| | | | Closes GH-5926
* Remove unnecessary PHPDoc-alike blocks from testsMáté Kocsis2020-06-246-36/+0
| | | | Closes GH-5759
* Trim trailing whitespaces and fix code styleRod Elias2020-05-121-1/+1
| | | | Closes GH-5554.
* Test xml_error_string() and xml_get_error_code()Symeon Charalabides2020-04-271-0/+38
| | | | Closes GH-5456.
* Tests for the default case of the parameter of xml_parser_get_option() and ↵Symeon Charalabides2020-04-222-0/+38
| | | | xml_parser_set_option(). These cases are, as of now, not being tested.
* Fix test after callback name changeNikita Popov2020-04-141-40/+20
|
* Reindent phpt filesNikita Popov2020-02-0319-379/+379
|
* Fix another batch of indentation in testsMáté Kocsis2020-02-021-7/+7
|
* Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-163-3/+3
|
* Clean DONE tags from testsFabien Villepinte2019-11-074-8/+0
| | | | | | | Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
* Fix bug #78563Mark2019-10-073-0/+50
| | | | | | Make XmlParser final, unclonable and unserializable. Closes GH-4778.
* Convert some notices to warningsNikita Popov2019-10-021-13/+2
| | | | Part of https://wiki.php.net/rfc/engine_warnings.
* Add missing SKIPIF (xml)Fabien Villepinte2019-09-042-0/+4
|
* ext/xml: Use object instead of resourceNikita Popov2019-04-082-0/+62
| | | | | | | | | | | | Use an XmlParser object instead of a resource. This is an internal representation change, not a conversion to OO APIs. XmlParser objects cannot be explicitly constructed, they are created through the usual xml_parser_* APIs. This change allows us to provide a proper get_gc() implementation, thus resolving bugs #72793 and #76874. xml_parser_free() is a no-op now and need not be called anymore.
* Replace dirname(__FILE__) by __DIR__ in testsFabien Villepinte2019-03-155-5/+5
|
* Remove more zpp error testsNikita Popov2019-03-0522-981/+0
|
* Added test for xml_parser_set_optionMark Niebergall2019-02-101-0/+25
| | | | - For skipping white space and triggering invalid encoding value error
* Remove zpp variation testsNikita Popov2019-02-0525-5929/+0
|
* Remove local variablesPeter Kokot2019-02-033-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* Fix and improve test caseChristoph M. Becker2018-10-301-3/+5
| | | | | We fix the erroneous doctype declaration, clarify the expectation, and add a comment to clarify the purpose of the tag mismatch in the XML.
* Fix #71592: External entity processing never failsChristoph M. Becker2018-10-271-0/+30
| | | | | | | | | | | | If the callback set via `xml_set_external_entity_ref_handler()` returns a falsy value, parsing is supposed to stop and the error number set to `XML_ERROR_EXTERNAL_ENTITY_HANDLING`. This is already correctly done by the libexpat binding, but the libxml2 binding ignores the return value. We fix this by calling `xmlStopParser()` which is available as of libxml 2.1.0[1] (PHP-7.1 requires at least libxml 2.6.11 anyway), and setting the desired `errNo` ourselves. [1] <http://xmlsoft.org/news.html>
* Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-10-161-0/+29
|\ | | | | | | | | * PHP-7.2: Add support for getting SKIP_TAGSTART and SKIP_WHITE options
| * Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-10-161-0/+29
| |\ | | | | | | | | | | | | * PHP-7.1: Add support for getting SKIP_TAGSTART and SKIP_WHITE options
| | * Add support for getting SKIP_TAGSTART and SKIP_WHITE optionsChristoph M. Becker2018-10-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | When `XML_OPTION_SKIP_TAGSTART` and `XML_OPTION_SKIP_WHITE` had been introduced[1], it had been overlooked to also support them for `xml_parser_get_option()`. We catch up on that. [1] <http://git.php.net/?p=php-src.git;a=commit;h=b57dc275950b228f2399990471c4f22b7d154c6c>
| | * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1554-55/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | * Trim trailing whitespace in *.phptPeter Kokot2018-10-1468-401/+401
| | |
| | * Convert CRLF line endings to LFPeter Kokot2018-10-131-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
| * | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1550-51/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| * | Trim trailing whitespace in *.phptPeter Kokot2018-10-1464-380/+380
| | |
* | | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1549-50/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | | Trim trailing whitespace in *.phptPeter Kokot2018-10-1464-380/+380
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-10-091-0/+42
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix #30875: xml_parse_into_struct() does not resolve entities
| * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-10-091-0/+42
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix #30875: xml_parse_into_struct() does not resolve entities
| | * Fix #30875: xml_parse_into_struct() does not resolve entitiesChristoph M. Becker2018-10-091-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting up an empty default handler is not only useless, but actually harmful, since internal entity-references are not resolved anymore. From the libexpat docs[1]: | Setting the handler with this call has the side effect of | turning off expansion of references to internally defined general | entities. Instead these references are passed to the default | handler. [1] <https://www.xml.com/pub/1999/09/expat/reference.html#setdefhandler>
* | | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-201-1/+1
| | | | | | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | | Use bool instead of boolean while throwing a type errorGabriel Caruso2018-02-0420-80/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHP requires boolean typehints to be written "bool" and disallows "boolean" as an alias. This changes the error messages to match the actual type name and avoids confusing messages like "must be of type boolean, boolean given". This a followup to ce1d69a1f6dcf15d43029301059c25e5bc09a577, which implements the same change for integer->int.
* | | Use int instead of integer in type errorsGabriel Caruso2018-02-0423-111/+111
| | | | | | | | | | | | | | | | | | | | | PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
* | | Add missing SKIPIF sectionsGabriel Caruso2018-02-031-1/+3
|/ /
* | Deprecate each()Nikita Popov2017-02-035-5/+5
| |
* | news entry for #1787Joe Watkins2016-11-131-0/+24
|\ \ | |/
| * phpt file to bug #73135Edgar R. Sandi2016-11-121-0/+24
| |
* | Move utf8_encode and utf8_decode to ext/standardAndrea Faulds2016-10-177-489/+0
|/
* Merge branch 'PHP-5.6' into PHP-7.0Christoph M. Becker2016-08-201-1/+1
|\
| * Improvements to fix #72714, suggested by nikicChristoph M. Becker2016-08-201-1/+1
| |
* | Merge branch 'PHP-5.6' into PHP-7.0Christoph M. Becker2016-08-201-0/+35
|\ \ | |/