wp-cli / embed-command

Inspects oEmbed providers, clears embed cache, and more.
MIT License
7 stars 11 forks source link

Test broken for `--force-regex` flag #49

Closed schlessera closed 5 years ago

schlessera commented 5 years ago

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:

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.