Update help_topic tests to HTML5

Created on 30 October 2023, 10 months ago
Updated 24 July 2024, about 2 months ago

Problem/Motivation

Follow up from #2441373-99: Upgrade tests to HTML5 were help_topic tests were split out.

there is a problem in one case, on bad_html3 help topic error template.
Likely the parsing is different and produces a bit different error for that case, or there is an actual error to fix.

Steps to reproduce

The test fail in #97 was related to the approach change.
Basically the error strings are different on Masterminds\HTML5 parser, than in php DOM extension libxml2.
Gladly there seems to be only one actual relevant error tested from the library output, the rest are errors created on the test itself related to structure.

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

📌 Task
Status

Needs work

Version

11.0 🔥

Component
PHPUnit 

Last updated about 11 hours ago

Created by

🇺🇸United States smustgrave

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @smustgrave
  • First commit to issue fork.
  • @marvil07 opened merge request.
  • @marvil07 opened merge request.
  • Status changed to Needs work 10 months ago
  • 🇵🇪Peru marvil07

    @smustgrave, thanks for creating the follow-up issue :+1:

    I have started by pushing the latest state of the changes I introduced on the help topic specific test from the original issue, to the html5-tests-help-topics branch.
    I also pushed the work-around so it is clear what is failing, to html5-tests-help-topics-with-workaround branch.
    Both have related MRs for the test run.

    Marking as NW, next step is trying to fix the failing format check edge case.

  • Pipeline finished with Success
    10 months ago
    Total: 662s
    #42953
  • Pipeline finished with Failed
    10 months ago
    Total: 901s
    #42948
  • 🇫🇷France andypost

    Updated summary a bit - ref to discussion where split proposed

    Maybe it will be easier to add another bad_html_v5 topic to have both expectations as both xhtml and html5 remains maintained in future version of PHP

    btw HTML5 compatible classes just commited to PHP 8.4 https://wiki.php.net/rfc/opt_in_dom_spec_compliance

  • 🇫🇷France andypost

    Core can check PHP version and use faster validator https://3v4l.org/IhHj3/rfc#vgit.master

    $ php -r 'var_dump((DOM\HTMLDocument::createEmpty())->relaxNgValidateSource("<p><a href=\"/foo\">Text here</p>"));'
    PHP Warning:  Dom\Document::relaxNgValidateSource(): Entity: line 1: parser error : Opening and ending tag mismatch: a line 1 and p in Command line code on line 1
    
    Warning: Dom\Document::relaxNgValidateSource(): Entity: line 1: parser error : Opening and ending tag mismatch: a line 1 and p in Command line code on line 1
    PHP Warning:  Dom\Document::relaxNgValidateSource(): <p><a href="/foo">Text here</p> in Command line code on line 1
    
    Warning: Dom\Document::relaxNgValidateSource(): <p><a href="/foo">Text here</p> in Command line code on line 1
    PHP Warning:  Dom\Document::relaxNgValidateSource():                                ^ in Command line code on line 1
    
    Warning: Dom\Document::relaxNgValidateSource():                                ^ in Command line code on line 1
    PHP Warning:  Dom\Document::relaxNgValidateSource(): xmlRelaxNGParse: could not parse schemas in Command line code on line 1
    
    Warning: Dom\Document::relaxNgValidateSource(): xmlRelaxNGParse: could not parse schemas in Command line code on line 1
    PHP Warning:  Dom\Document::relaxNgValidateSource(): Invalid RelaxNG in Command line code on line 1
    
    Warning: Dom\Document::relaxNgValidateSource(): Invalid RelaxNG in Command line code on line 1
    bool(false)
    
  • Pipeline finished with Failed
    about 2 months ago
    Total: 168s
    #233434
  • Pipeline finished with Failed
    about 2 months ago
    Total: 264s
    #233436
  • Pipeline finished with Failed
    about 2 months ago
    #233438
Production build 0.71.5 2024