From 3e5005c30cd4bb6686ba28891daa0ee7342f0ff0 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 4 Aug 2017 14:05:27 +0000 Subject: [PATCH] Media: Move the `Tests_Media::test_video_shortcode_body()` method so it runs before other tests in the class that depend on it. The following tests were never executed as they have `@depends` annotations which means they get skipped because the `test_video_shortcode_body()` test has not run by the time they run. Re-ordering the test methods fixes this. * `test_wp_video_shortcode_with_empty_params()` * `test_wp_video_shortcode_with_bad_attr()` * `test_wp_video_shortcode_attributes()` * `test_wp_video_shortcode_youtube_remove_feature()` * `test_wp_video_shortcode_youtube_force_ssl()` * `test_wp_video_shortcode_vimeo_force_ssl_remove_query_args()` * `test_wp_video_shortcode_vimeo_adds_loop()` * `test_wp_video_shortcode_vimeo_force_adds_loop_true()` See #35367 git-svn-id: https://develop.svn.wordpress.org/trunk@41229 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/media.php | 94 +++++++++++++++++------------------ 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/tests/phpunit/tests/media.php b/tests/phpunit/tests/media.php index c3e4014a8c..392c039fdb 100644 --- a/tests/phpunit/tests/media.php +++ b/tests/phpunit/tests/media.php @@ -664,6 +664,53 @@ VIDEO; $this->assertContains( 'style="padding:0;"', $actual ); } + /** + * Test [video] shortcode processing + * + */ + function test_video_shortcode_body() { + $width = 720; + $height = 480; + + $w = empty( $GLOBALS['content_width'] ) ? 640 : $GLOBALS['content_width']; + if ( $width > $w ) { + $width = $w; + } + + $post_id = get_post() ? get_the_ID() : 0; + + $video =<<