Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is a random fail around HTML encoding in AjaxTest that is getting in the way of some test runs.
fail: [Other] Line 109 of modules/ubercart/uc_store/src/Tests/AjaxTest.php:
Escaped "1"jy>&ag" found
Comment | File | Size | Author |
---|---|---|---|
#6 | ajaxtest-fix.patch | 806 bytes | longwave |
| |||
#3 | 2664320.patch | 1.96 KB | longwave |
Comments
Comment #2
longwaveComment #3
longwaveA minimal test case to prove this is not strictly an Ubercart issue is attached. None of the three assert methods are capable of finding the option text, even though it appears on the page.
The problem appears to be that when WebTestBase::drupalProcessAjaxResponse() manipulates the HTML output via DOMDocument, " gets converted back into " but other entities such as < are still escaped.
Comment #4
longwavehttp://stackoverflow.com/questions/28399653/php-how-to-use-quot-entities... looks like the same problem.
Comment #5
TR CreditAttribution: TR commentedI have a feeling this is also related to #2534240: Country tests fail when country contains single-quote (Simpletest bug)
Comment #6
longwaveWe can use randomMachineName() for this specific case instead of randomString().
Comment #9
longwaveCommitted #6