diff --git a/.travis.yml b/.travis.yml index 697bac1..1d224fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,10 @@ matrix: - php: 5.3 dist: precise env: WP_VERSION=latest + - php: 7.0 + env: WP_VERSION=4.5.3 + - php: 7.0 + env: WP_VERSION=4.3.1 before_install: - | diff --git a/features/fetch.feature b/features/fetch.feature index dcda41d..4dfa75c 100644 --- a/features/fetch.feature +++ b/features/fetch.feature @@ -3,8 +3,9 @@ Feature: Manage oEmbed cache. Background: Given a WP install + # Behavior that's the same for all WP versions. Scenario: Get HTML embed code for a given URL - # Provider not requiring discovery + # Known provider not requiring discovery. When I run `wp embed fetch https://www.youtube.com/watch?v=dQw4w9WgXcQ --width=500` Then STDOUT should contain: """ @@ -15,7 +16,90 @@ Feature: Manage oEmbed cache. dQw4w9WgXcQ """ - # Provider requiring discovery + # Unknown provider (taken from https://oembed.com) requiring discovery but returning iframe so not sanitized. + # Old versions of WP_oEmbed can trigger PHP "Only variables should be passed by reference" notices on discover so use "try" to cater for these. + When I try `wp embed fetch http://LearningApps.org/259` + Then the return code should be 0 + And STDERR should not contain: + """ + Error: + """ + And STDOUT should contain: + """ + LearningApps.org/ + """ + And STDOUT should contain: + """ +