[wp-trac] [WordPress Trac] #57071: PHPUnit tests are broken

WordPress Trac noreply at wordpress.org
Fri Nov 11 11:13:37 UTC 2022


#57071: PHPUnit tests are broken
--------------------------------+------------------------------
 Reporter:  emanuelx            |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Build/Test Tools    |     Version:  6.1
 Severity:  normal              |  Resolution:
 Keywords:  needs-testing-info  |     Focuses:
--------------------------------+------------------------------

Comment (by SergeyBiryukov):

 Hi there, welcome to WordPress Trac! Thanks for the report.

 Replying to [ticket:57071 emanuelx]:
 > I've analysed the code, and this is issue with duplicated slash is
 present on the code for several versions. So, something was introduced on
 this version 6.1 to trigger the error with require_once.
 >
 > Error ABSPATH with forward slash: `/usr/src/wordpress/`
 > ...
 > Error ABSPATH without forward slash: `/usr/src/wordpress`

 Just to clarify, `ABSPATH` does need the trailing slash:
 * It is defined with the slash in [source:tags/6.1/wp-config-
 sample.php?marks=92#L90 wp-config-sample.php].
 * There is also a note on this in [source:tags/6.1/wp-tests-config-
 sample.php?marks=3,4#L1 wp-tests-config-sample.php].
 So I don't think defining it without the slash would work.

 Looking at the error:
 > `[11-Nov-2022 10:03:02 UTC] PHP Fatal error:  Uncaught Error: Failed
 opening required '/usr/src/wordpress//wp-includes/class-wpdb.php'
 (include_path='.:/usr/local/lib/php') in
 /app/wordpress/tests/includes/install.php:43`
 I think the double forward slash is not the issue here, it rather has to
 do with the `wpdb` class file being renamed from `wp-db.php` to `class-
 wpdb.php`, see #56268.

 Could you confirm that the file exists in `/usr/src/wordpress/`? Is that
 directory also updated to WordPress 6.1?

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


More information about the wp-trac mailing list