Changeset 54403
- Timestamp:
- 10/07/2022 01:07:28 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-server.php
r54083 r54403 13 13 protected static $icon_id; 14 14 15 /** 16 * Called before setting up all tests. 17 */ 18 public static function set_up_before_class() { 19 parent::set_up_before_class(); 20 21 // Require files that need to load once. 22 require_once DIR_TESTROOT . '/includes/mock-invokable.php'; 23 } 24 15 25 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 16 26 $filename = DIR_TESTDATA . '/images/test-image-large.jpg'; 17 27 self::$icon_id = $factory->attachment->create_upload_object( $filename ); 28 } 29 30 public static function tear_down_after_class() { 31 wp_delete_attachment( self::$icon_id, true ); 32 33 parent::tear_down_after_class(); 18 34 } 19 35 … … 34 50 35 51 parent::tear_down(); 36 }37 38 /**39 * Called before setting up all tests.40 */41 public static function set_up_before_class() {42 parent::set_up_before_class();43 44 // Require files that need to load once.45 require_once DIR_TESTROOT . '/includes/mock-invokable.php';46 52 } 47 53
Note: See TracChangeset
for help on using the changeset viewer.