Skip to content

Commit

Permalink
Build/Test Tools: Switch to some more appropriate assertions.
Browse files Browse the repository at this point in the history
See #54725


git-svn-id: https://develop.svn.wordpress.org/trunk@52654 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
johnbillion committed Jan 30, 2022
1 parent ffd6127 commit 24b83dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/phpunit/tests/includes/factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ public function set_up() {

public function test_create_creates_a_category() {
$id = $this->category_factory->create();
$this->assertTrue( (bool) get_term_by( 'id', $id, 'category' ) );
$this->assertInstanceOf( 'WP_Term', get_term_by( 'id', $id, 'category' ) );
}

public function test_get_object_by_id_gets_an_object() {
$id = $this->category_factory->create();
$this->assertTrue( (bool) $this->category_factory->get_object_by_id( $id ) );
$this->assertInstanceOf( 'WP_Term', $this->category_factory->get_object_by_id( $id ) );
}

public function test_get_object_by_id_gets_an_object_with_the_same_name() {
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/term.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function test_wp_add_remove_object_terms() {
}

foreach ( $posts as $post_id ) {
$this->assertTrue( (bool) wp_delete_post( $post_id ) );
$this->assertInstanceOf( 'WP_Post', wp_delete_post( $post_id ) );
}
}

Expand Down

0 comments on commit 24b83dd

Please sign in to comment.