#38761 closed defect (bug) (fixed)
Tests_WP_MS_Sites_List_Table test fails when run on their own
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.7 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | has-patch needs-testing has-unit-tests |
| Focuses: | Cc: |
Description
If i run the following command:
phpunit --filter Tests_WP_MS_Sites_List_Table -c tests/phpunit/multisite.xml
tests will fail with this message
Undefined index: hook_suffix
/srv/www/wordpress-develop/src/wp-admin/includes/class-wp-screen.php:229
/srv/www/wordpress-develop/src/wp-admin/includes/template.php:2029
/srv/www/wordpress-develop/src/wp-admin/includes/class-wp-list-table.php:143
/srv/www/wordpress-develop/src/wp-admin/includes/class-wp-ms-sites-list-table.php:48
/srv/www/wordpress-develop/src/wp-admin/includes/list-table.php:53
/srv/www/wordpress-develop/tests/phpunit/tests/multisite/wpMSSitesListTable.php:19
Attachments (1)
Change History (6)
#2
@
9 years ago
- Keywords has-patch needs-testing has-unit-tests added; needs-unit-tests removed
Patch fixes the issue by including the second parameter for _get_list_table(). There was one other test class where _get_list_table() was being called. I modified that test to use the second parameter instead of setting the global for consistency.
Fixes issue with test failing when called directly.