MinkSelenium2Driver
MinkSelenium2Driver copied to clipboard
Fix NL replace (do not replace \r\n with two spaces)
previously \r\n was replaced by 2 spaces
Problem uncovered by this PR: we're not testing the normalization logic of the getText method, because:
- tests haven't failed after the change in this PR
- each of drivers does its own normalization (Zombie replaces any trailing whitespace with a single space; BrowserKit replaces
\nwith a single space and then replaces all trailing spaces with a single space; Selenium2 replace any line break with a single space)
Proposed next steps:
- decide what we can test (not sure if
\rcould properly be tested in headless drivers) - add a new test and restart all driver repo builds to see which drivers actually comply
- rebase this PR to see how the Selenium2 driver is doing
I have removed https://github.com/minkphp/MinkSelenium2Driver/commit/4391f590d3b0fe0adc7033edc45900df0a61b1c3 commit to not trim and keep this PR to bare minimum of the described problem.
@mvorisek , now I like the change.
@stof , what about testing considering that each driver is doing it differently?