Skip to content

Commit

Permalink
Tests: Remove 'errors' assertion when not WP_Error in Tests_Term_WpIn…
Browse files Browse the repository at this point in the history
…sertTerm.

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.

git-svn-id: https://develop.svn.wordpress.org/trunk@58920 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
hellofromtonya committed Aug 21, 2024
1 parent 5c19fa1 commit 04eec0c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion tests/phpunit/tests/term/wpInsertTerm.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ public function test_wp_insert_term_slug_0() {
public function test_wp_insert_term_duplicate_name() {
$term = self::factory()->tag->create_and_get( array( 'name' => 'Bozo' ) );
$this->assertNotWPError( $term );
$this->assertEmpty( $term->errors );

// Test existing term name with unique slug.
$term1 = self::factory()->tag->create(
Expand Down

0 comments on commit 04eec0c

Please sign in to comment.