[wp-trac] [WordPress Trac] #39822: PHPUnit 6 compatibility

WordPress Trac noreply at wordpress.org
Fri Mar 10 14:14:39 UTC 2017


#39822: PHPUnit 6 compatibility
-------------------------------------+------------------------------
 Reporter:  miyauchi                 |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Build/Test Tools         |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  needs-refresh has-patch  |     Focuses:
-------------------------------------+------------------------------

Comment (by johnbillion):

 @gitlost In [attachment:39822.3.patch] rather than replacing every
 instance of `setExpectedException()` with `_setExpectedException()`, you
 should be able to do something like this:

 {{{
 protected function setExpectedException( ... ) {
         if ( is_callable( 'parent::setExpectedException' ) ) {
                 parent::setExpectedException( ... );
         } else {
                 // shim code
         }
 }
 }}}

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


More information about the wp-trac mailing list