[wp-trac] [WordPress Trac] #63590: Youtube oEmbed Test is not loading scripts

WordPress Trac noreply at wordpress.org
Thu Jun 19 13:54:12 UTC 2025


#63590: Youtube oEmbed Test is not loading scripts
-------------------------------------------------+-------------------------
 Reporter:  SirLouen                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Embeds                               |     Version:  5.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-test-info has-patch has-unit-    |     Focuses:  tests
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by SirLouen):

 Hey @abcd95

 I was thinking about this originally. But I'm not 100% confident that this
 should be only applied to that class. Or this is applied globally, or this
 is applied test level, targeting `utils` or `wp-embed`.

 But if no other test in that class is benefiting from this, or any test
 could benefit from this, why not any overall test would benefit from this?
 Why not set this on `parent::set_up()`? Or why not in `wpSetUpBeforeClass`
 just like `self::touch( ABSPATH . WPINC . '/js/wp-embed.js' );`, again,
 just for `utils` or `wp-embed` instead of a script-wide loading?

 In fact [https://github.com/SirLouen/wordpress-
 develop/blob/trunk/tests/phpunit/tests/blocks/register.php#L486 its not
 uncommon to laser load the scripts in specific tests] or
 [https://github.com/SirLouen/wordpress-
 develop/blob/trunk/tests/phpunit/tests/oembed/template.php#L320 here]

 My advice: When suggesting things regarding unit testing, I would first
 check examples all over the place to make an argument before throwing just
 the idea of improvement.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63590#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list