mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-25 05:34:32 +00:00
Build/Test Tools: Cleanup link-manager.zip after REST API tests are finished.
Introduced in [48242], the `link-manager` plugin is copied from `DIR_TESTDATA/plugins` to `DIR_TESTDATA` during the REST API unit tests, but was not cleaned up afterward. This created a "dirty" local working copy. This change `unlink`s the copied plugin from `DIR_TESTDATA` after unit tests are completed. Props johnbillion, TimothyBlynJacobs, desrosj, rachelbaker. Fixes #52579. git-svn-id: https://develop.svn.wordpress.org/trunk@50633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -86,6 +86,9 @@ class WP_REST_Plugins_Controller_Test extends WP_Test_REST_Controller_Testcase {
|
||||
if ( file_exists( WP_PLUGIN_DIR . '/test-plugin/test-plugin.php' ) ) {
|
||||
$this->rmdir( WP_PLUGIN_DIR . '/test-plugin' );
|
||||
}
|
||||
if ( file_exists( DIR_TESTDATA . '/link-manager.zip' ) ) {
|
||||
unlink( DIR_TESTDATA . '/link-manager.zip' );
|
||||
}
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user