[wp-trac] [WordPress Trac] #55632: WordPress database error when running PHPUnit tests

WordPress Trac noreply at wordpress.org
Wed Apr 27 17:02:07 UTC 2022


#55632: WordPress database error when running PHPUnit tests
--------------------------+-----------------------------
 Reporter:  Chouby        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When running PHPUnit tests, a database error is reported before the first
 test is run
 {{{
 WordPress database error Table 'wordpress_develop_tests.wptests_posts'
 doesn't exist for query
                                         SELECT   wptests_posts.ID
                                         FROM wptests_posts
                                         WHERE 1=1  AND (
   0 = 1
 ) AND wptests_posts.post_type = 'wp_global_styles' AND
 ((wptests_posts.post_status = 'publish'))
                                         GROUP BY wptests_posts.ID
                                         ORDER BY wptests_posts.post_date
 DESC
 <div id="error"><p class="wpdberror"><strong>WordPress database
 error:</strong> [Table 'wordpress_develop_tests.wptests_posts'
 doesn't exist]<br /><code>
                                         SELECT   wptests_posts.ID
                                         FROM wptests_posts
                                         LIMIT 0, 1
                                         WHERE 1=1  AND (
                                  made by require_once('wp-settings.php'),
 do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters,
 {closure}, {closure}, WP_Theme_JSON_Resolver::get_merged_data,
 WP_Theme_JSON_Resolver::get_user_data,
 WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles,
 wp_get_recent_posts, get_posts, WP_Query->query, WP_Query->get_posts
   0 = 1
 ) AND wptests_posts.post_type = 'wp_global_styles' AND
 ((wptests_posts.post_status = 'publish'))
                                         GROUP BY wptests_posts.ID
                                         ORDER BY wptests_posts.post_date
 DESC
                                         LIMIT 0, 1
                                 </code></p></div>
 }}}

 See for example: https://github.com/WordPress/wordpress-
 develop/runs/6195555843?check_suite_focus=true

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


More information about the wp-trac mailing list