The tests are currently failing for the List oEmbed providers scenario when it tries to test the effects of the --force-regex flag.
It took me a bit of research to understand what's happening. Here's my current understanding:
oEmbed provider formats can be provided as proper regexes, or in a simplified format that uses an asterisk as a wildcard.
The --force-regex flag turns the simplified format in a proper regex.
The test assumed that Core comes with some simplified formats by default. Therefore, to test whether the --force-regex had an effect, it simplifies the logic by just testing whether the result with the flag is different from the result without the flag.
Now, Core currently only ships with proper regex formats by default, no simplified ones.
This makes the test fail, as there's nothing to convert, and hence the result with or without the flag is exactly the same.
This means that the test needs to be changed to verify this in a different way. I think the easiest is to filter the list of providers before retrieving them, injecting a simplified format in there and comparing before & after application of the --force-regex flag. If we inject one ourselves, we can even test against the exact regex to be generated.
The tests are currently failing for the
List oEmbed providers
scenario when it tries to test the effects of the--force-regex
flag.It took me a bit of research to understand what's happening. Here's my current understanding:
--force-regex
flag turns the simplified format in a proper regex.--force-regex
had an effect, it simplifies the logic by just testing whether the result with the flag is different from the result without the flag.This means that the test needs to be changed to verify this in a different way. I think the easiest is to filter the list of providers before retrieving them, injecting a simplified format in there and comparing before & after application of the
--force-regex
flag. If we inject one ourselves, we can even test against the exact regex to be generated.