Skip to content

Commit 04eec0c

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@58920 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 5c19fa1 commit 04eec0c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

tests/phpunit/tests/term/wpInsertTerm.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ public function test_wp_insert_term_slug_0() {
186186
public function test_wp_insert_term_duplicate_name() {
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.
192191
$term1 = self::factory()->tag->create(

0 commit comments

Comments
 (0)