Make WordPress Core


Ignore:
Timestamp:
08/21/2024 09:04:15 PM (7 weeks ago)
Author:
hellofromTonya
Message:

Tests: Remove 'errors' assertion when not WP_Error in Tests_Term_WpInsertTerm.

Removes the assertion for 'errors' being empty when the instance is WP_Term and not WP_Error. This property exists on WP_Error.

This assertion always passed because it was checking a dynamic property on WP_Term that does not exist and is not added within Core. Thus, this assertion is not needed and fails with dynamic property deprecations.

Follow-up to [51403], [34646], [29830].

See #61890, #61530.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/wpInsertTerm.php

    r57251 r58920  
    187187        $term = self::factory()->tag->create_and_get( array( 'name' => 'Bozo' ) );
    188188        $this->assertNotWPError( $term );
    189         $this->assertEmpty( $term->errors );
    190189
    191190        // Test existing term name with unique slug.
Note: See TracChangeset for help on using the changeset viewer.