Changeset 54865
- Timestamp:
- 11/22/2022 09:25:27 PM (2 years ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r54366 r54865 323 323 * 324 324 * Stores $wp_actions, $wp_current_filter, and $wp_filter on a class variable 325 * so they can be restored on tear Down() using _restore_hooks().325 * so they can be restored on tear_down() using _restore_hooks(). 326 326 * 327 327 * @global array $wp_actions … … 341 341 342 342 /** 343 * Restores the hook-related globals to their state at set Up()343 * Restores the hook-related globals to their state at set_up() 344 344 * so that future tests aren't affected by hooks set during this last test. 345 345 * … … 1366 1366 * Deletes files added to the `uploads` directory during tests. 1367 1367 * 1368 * This method works in tandem with the `setUp()` and `rmdir()` methods: 1369 * - `setUp()` scans the `uploads` directory before every test, and stores its contents inside of the 1370 * `$ignore_files` property. 1371 * - `rmdir()` and its helper methods only delete files that are not listed in the `$ignore_files` property. If 1372 * called during `tearDown()` in tests, this will only delete files added during the previously run test. 1368 * This method works in tandem with the `set_up()` and `rmdir()` methods: 1369 * - `set_up()` scans the `uploads` directory before every test, and stores 1370 * its contents inside of the `$ignore_files` property. 1371 * - `rmdir()` and its helper methods only delete files that are not listed 1372 * in the `$ignore_files` property. If called during `tear_down()` in tests, 1373 * this will only delete files added during the previously run test. 1373 1374 */ 1374 1375 public function remove_added_uploads() { -
trunk/tests/phpunit/includes/testcase-canonical.php
r51585 r54865 38 38 * Generate fixtures to be shared between canonical tests. 39 39 * 40 * Abstracted here because it's invoked by setUpBeforeClass() in more than one class.40 * Abstracted here because it's invoked by wpSetUpBeforeClass() in more than one class. 41 41 * 42 42 * @since 4.1.0 … … 47 47 48 48 /* 49 * Also set in self::set Up(), but we must configure here to make sure that49 * Also set in self::set_up(), but we must configure here to make sure that 50 50 * post authorship is properly attributed for fixtures. 51 51 */ -
trunk/tests/phpunit/tests/customize/custom-css-setting.php
r54088 r54865 26 26 * Set up the test case. 27 27 * 28 * @see WP_UnitTestCase ::setup()28 * @see WP_UnitTestCase_Base::set_up() 29 29 */ 30 30 public function set_up() { -
trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php
r52010 r54865 17 17 * Set up a test case. 18 18 * 19 * @see WP_UnitTestCase ::setup()19 * @see WP_UnitTestCase_Base::set_up() 20 20 */ 21 21 public function set_up() { -
trunk/tests/phpunit/tests/customize/nav-menu-setting.php
r52010 r54865 18 18 * Set up a test case. 19 19 * 20 * @see WP_UnitTestCase ::setup()20 * @see WP_UnitTestCase_Base::set_up() 21 21 */ 22 22 public function set_up() { -
trunk/tests/phpunit/tests/customize/nav-menus.php
r54090 r54865 18 18 * Set up a test case. 19 19 * 20 * @see WP_UnitTestCase ::setup()20 * @see WP_UnitTestCase_Base::set_up() 21 21 */ 22 22 public function set_up() { -
trunk/tests/phpunit/tests/db/dbDelta.php
r54711 r54865 100 100 parent::tear_down(); 101 101 102 // This has to be called after the parent `tear Down()` method.102 // This has to be called after the parent `tear_down()` method. 103 103 $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}dbdelta_test" ); 104 104 } -
trunk/tests/phpunit/tests/query/postStatus.php
r51568 r54865 88 88 * 89 89 * CPTs and CPSs are reset between each test run so need to be registered 90 * in both the wpSetUpBeforeClass() and set Up() methods.90 * in both the wpSetUpBeforeClass() and set_up() methods. 91 91 */ 92 92 public static function register_custom_post_objects() { -
trunk/tests/phpunit/tests/user/capabilities.php
r54673 r54865 1708 1708 1709 1709 public function nullify_current_user() { 1710 // Prevents fatal errors in ::tear Down()'s and other uses of restore_current_blog().1710 // Prevents fatal errors in ::tear_down()'s and other uses of restore_current_blog(). 1711 1711 $function_stack = wp_debug_backtrace_summary( null, 0, false ); 1712 1712 if ( in_array( 'restore_current_blog', $function_stack, true ) ) {
Note: See TracChangeset
for help on using the changeset viewer.