[wp-trac] [WordPress Trac] #42124: Unit test errors with PHPUnit 6.4.0

WordPress Trac noreply at wordpress.org
Fri Oct 6 17:55:44 UTC 2017


#42124: Unit test errors with PHPUnit 6.4.0
------------------------------+-----------------
 Reporter:  joemcgill         |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  high              |  Milestone:  4.9
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------
 Change in PHPUnit 6.4.0, resulted in our tests to start failing.
 Specifically,

 {{{
 1) Tests_Image_Functions::test_load_directory
 TypeError: get_resource_type() expects parameter 1 to be resource, string
 given
 /home/travis/build/WordPress/wordpress-
 develop/tests/phpunit/tests/image/functions.php:269
 }}}

 This test uses `assertNotInternalType()` to ensure `wp_load_image()` and
 `wp_get_image_editor()` wouldn't load a link to a resource (see #17814).
 Under the hood, PHPUnit uses `get_resource_type()` in this assertion,
 which will produce an error that was previously not surfaced.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42124>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list