[wp-trac] [WordPress Trac] #31432: Unit tests are sensitive to line endings
WordPress Trac
noreply at wordpress.org
Wed May 29 01:42:24 UTC 2019
#31432: Unit tests are sensitive to line endings
------------------------------+-----------------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
------------------------------+-----------------------------
Comment (by azaozz):
Seems the "time proven" solution was to use `assertContains()` when
testing HTML output.
Still seeing line endings errors in phpunit/tests/dependencies/scripts.php
that are caused by comparing with `wp_scripts_print_translations_output`
that holds some inline JS. It tests translation scripts outputted with
printf() in script-loader. Seems we can test it with `assertContains()`
too, perhaps only one line, not the whole script.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31432#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list