Build/Test Tools: Remove unused posts from AJAX test setUp().

Removes the creation of five posts from the AJAX test suite `setUp()` function, replacing it with a shared fixture only where required.

See #51802.


git-svn-id: https://develop.svn.wordpress.org/trunk@49696 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson
2020-11-25 04:09:41 +00:00
parent a86bedfc92
commit 95751aeec2
2 changed files with 30 additions and 6 deletions

View File

@@ -149,9 +149,6 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
// Suppress warnings from "Cannot modify header information - headers already sent by".
$this->_error_level = error_reporting();
error_reporting( $this->_error_level & ~E_WARNING );
// Make some posts.
self::factory()->post->create_many( 5 );
}
/**