Make WordPress Core


Ignore:
Timestamp:
08/27/2016 08:35:16 AM (9 years ago)
Author:
wonderboymusic
Message:

Unit Tests:

  • Automatically delete objects that we were created during wpSetUpBeforeClass - posts, comments, terms (except 1), and user (except 1)
  • The amount of leftover data between tests was breathtaking - use the new function: _delete_all_data()
  • Commit database transactions for all TestCases, not just those that implement wpSetUpBeforeClass and wpTearDownAfterClass
  • The tests run 10-20 seconds faster now

See #37699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/canonical/noRewrite.php

    r35191 r38398  
    1111
    1212    // These test cases are run against the test handler in WP_Canonical
    13     public static function wpSetUpBeforeClass( $factory ) {
    14         self::generate_shared_fixtures( $factory );
    15     }
    16 
    17     public static function wpTearDownAfterClass() {
    18         self::delete_shared_fixtures();
    19     }
    2013
    2114    public function setUp() {
Note: See TracChangeset for help on using the changeset viewer.